|
@@ -16,7 +16,7 @@
|
|
|
|
|
|
|
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
|
|
const RelativeBundleTracker = require('./relativeBundleTracker');
|
|
const RelativeBundleTracker = require('./relativeBundleTracker');
|
|
|
-const RemoveVueAbsolutePathFromMapPlugin = require('./removeVueAbsolutePathFromMapPlugin');
|
|
|
|
|
|
|
+const AdjustMapPathsPlugin = require('./AdjustMapPathsPlugin');
|
|
|
const webpack = require('webpack');
|
|
const webpack = require('webpack');
|
|
|
const { VueLoaderPlugin } = require('vue-loader');
|
|
const { VueLoaderPlugin } = require('vue-loader');
|
|
|
|
|
|
|
@@ -29,13 +29,6 @@ const BUNDLES = {
|
|
|
const getPluginConfig = (name, withAnalyzer) => {
|
|
const getPluginConfig = (name, withAnalyzer) => {
|
|
|
const plugins = [
|
|
const plugins = [
|
|
|
new webpack.ProgressPlugin(),
|
|
new webpack.ProgressPlugin(),
|
|
|
- new webpack.SourceMapDevToolPlugin({
|
|
|
|
|
- exclude: [/-parser-/g],
|
|
|
|
|
- filename: `${name}/[file].map`,
|
|
|
|
|
- publicPath: `/static/desktop/js/bundles/${name}/`,
|
|
|
|
|
- fileContext: 'public',
|
|
|
|
|
- columns: false
|
|
|
|
|
- }),
|
|
|
|
|
new RelativeBundleTracker({
|
|
new RelativeBundleTracker({
|
|
|
path: '.',
|
|
path: '.',
|
|
|
filename: `webpack-stats${name !== BUNDLES.HUE ? '-' + name : ''}.json`
|
|
filename: `webpack-stats${name !== BUNDLES.HUE ? '-' + name : ''}.json`
|
|
@@ -43,7 +36,7 @@ const getPluginConfig = (name, withAnalyzer) => {
|
|
|
new webpack.BannerPlugin(
|
|
new webpack.BannerPlugin(
|
|
|
'\nLicensed to Cloudera, Inc. under one\nor more contributor license agreements. See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership. Cloudera, Inc. licenses this file\nto you under the Apache License, Version 2.0 (the\n"License"); you may not use this file except in compliance\nwith the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n'
|
|
'\nLicensed to Cloudera, Inc. under one\nor more contributor license agreements. See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership. Cloudera, Inc. licenses this file\nto you under the Apache License, Version 2.0 (the\n"License"); you may not use this file except in compliance\nwith the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n'
|
|
|
),
|
|
),
|
|
|
- new RemoveVueAbsolutePathFromMapPlugin()
|
|
|
|
|
|
|
+ new AdjustMapPathsPlugin()
|
|
|
];
|
|
];
|
|
|
if (withAnalyzer) {
|
|
if (withAnalyzer) {
|
|
|
plugins.push(new BundleAnalyzerPlugin({ analyzerPort: 9000 }));
|
|
plugins.push(new BundleAnalyzerPlugin({ analyzerPort: 9000 }));
|