X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=webpack.devConfig.js;h=232e54149055cfaacf2eb22b22f3f14896e1c0ee;hb=refs%2Fheads%2Fjakarta;hp=e4bf80b0a0de1165ca0850a8bb1b3803fd980a4b;hpb=e513a1ce93b9a70f01b62ca7560dbe52376cc5bd;p=aai%2Fsparky-fe.git diff --git a/webpack.devConfig.js b/webpack.devConfig.js index e4bf80b..232e541 100644 --- a/webpack.devConfig.js +++ b/webpack.devConfig.js @@ -23,23 +23,26 @@ var path = require('path'); var webpack = require('webpack'); var devPort = process.env.PORT || 8001; +var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; module.exports = { - devtool: 'eval-source-map', + devtool: 'source-map', entry: { bundle: [ 'app/main.app.jsx', 'webpack/hot/only-dev-server' - ], - 'editAttributes/editAttributesBundle': [ - 'editAttributes/main.app.jsx', - 'webpack/hot/only-dev-server' ] }, + externals: [ + { + xmlhttprequest: 'XMLHttpRequest' + } + ], output: { - path: path.join(__dirname, 'dist'), - publicPath: ``, - filename: '[name].js' + path: path.join(__dirname, 'dist/aai'), + publicPath: 'https://localhost:8001/', + filename: '[name].js', + sourceMapFilename: '[name].js.map' }, resolve: { root: [path.resolve('.')], @@ -47,13 +50,13 @@ module.exports = { app: 'src/app', 'generic-components': 'src/generic-components', utils: 'src/utils', - images: 'resources/images', - editAttributes: 'src/editAttributes' + images: 'resources/images' }, extensions: ["", ".webpack.js", ".web.js", ".js", ".json", ".jsx"] }, devServer: { port: devPort, + disableHostCheck: true, historyApiFallback: true, publicPath: ``, contentBase: path.join(__dirname, 'dist'), @@ -67,11 +70,8 @@ module.exports = { } }, module: { - preLoaders: [ - {test: /\.(js|jsx)$/, loader: 'source-map-loader'} - ], loaders: [ - {test: /\.(js|jsx)$/, loaders: ['babel-loader', 'eslint-loader'], exclude: /node_modules/}, + {test: /\.(js|jsx)$/, loaders: ['babel-loader'], exclude: /node_modules/}, {test: /\.(css|scss)$/, loaders: ['style-loader', 'css-loader', 'sass-loader']}, // required for font icons {test: /\.(woff|woff2|ttf|eot|otf)(\?.*)?$/, loader: 'url-loader?limit=163840&mimetype=application/font-woff&name=[name].[ext]'}, @@ -82,10 +82,12 @@ module.exports = { }, eslint: { configFile: './.eslintrc', - emitError: true, + failOnError: false, + emitError: false, emitWarning: true }, plugins: [ + //new BundleAnalyzerPlugin(), new webpack.DefinePlugin({ DEBUG: true }),