dox-sequence webpack version upgrade
Issue-ID: SDC-944
Change-Id: I3a23ac40a83835ee73addc9812f6634f49cc3553
Signed-off-by: svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
diff --git a/dox-sequence-diagram-ui/webpack.config.js b/dox-sequence-diagram-ui/webpack.config.js
index 94850ec..72a4837 100644
--- a/dox-sequence-diagram-ui/webpack.config.js
+++ b/dox-sequence-diagram-ui/webpack.config.js
@@ -24,53 +24,42 @@
libraryTarget: 'umd'
},
resolve: {
- extensions: ['', '.js', '.jsx']
- },
- eslint: {
- failOnWarning: false,
- failOnError: false,
- configFile: 'eslintrc.json'
+ extensions: ['.js', '.jsx']
},
devtool: 'eval-source-map',
module: {
- preLoaders: [{
- test: /\.(js|jsx)?$/,
- loader: 'eslint-loader',
- exclude: /node_modules/
- }],
- loaders: [{
- test: /\.(js|jsx)$/,
- include: path.join(PATHS.SRC, 'lib'),
- loader: 'babel-loader',
- exclude: /node_modules/,
- query: {
- presets: ['es2015', 'react']
- }
- }, {
- test: /\.css$/,
- loaders: ['style', 'css']
- }, {
- test: /\.(png|woff|woff2|eot|ttf|otf)$/,
- loader: 'url-loader?limit=100000'
- }, {
- test: /\.scss$/,
- include: path.join(PATHS.SRC, 'res'),
- loaders: ['style', 'css', 'sass']
- }, {
- test: /\.html$/,
- include: path.join(PATHS.SRC, 'lib'),
- loaders: ['raw']
- }, {
- test: /\.json$/,
- include: path.join(PATHS.SRC, 'lib'),
- loaders: ['json']
- }, {
- test: /\.svg$/,
- loader: 'svg-sprite?' + JSON.stringify({
- name: '[name]_[hash]',
- prefixize: true
- })
- }]
+ rules: [
+ {test: /\.(js|jsx)$/, loader: 'eslint-loader', exclude: [/node_modules/], enforce: 'pre'},
+ {test: /\.(js|jsx)$/, loader: 'babel-loader',
+ exclude: /node_modules/,
+ include: path.join(PATHS.SRC, 'lib')},
+ {test: /\.(css)$/, use: [
+ {loader: 'style-loader'},
+ {loader: 'css-loader'}]},
+ {test: /\.(png|woff|woff2|eot|ttf|otf)$/, loader: 'url-loader?limit=100000'},
+ {
+ test: /\.scss$/,
+ include: path.join(PATHS.SRC, 'res'),
+ loaders: ['style-loader', 'css-loader', 'sass-loader']
+ },
+ {
+ test: /\.html$/,
+ include: path.join(PATHS.SRC, 'lib'),
+ loaders: ['raw-loader']
+ },
+ {
+ test: /\.json$/,
+ include: path.join(PATHS.SRC, 'lib'),
+ loaders: ['json-loader']
+ },
+ {
+ test: /\.svg$/,
+ loader: 'svg-sprite-loader?' + JSON.stringify({
+ name: '[name]_[hash]',
+ prefixize: true
+ })
+ }
+ ]
},
externals: (devmode ? {} : {
'd3': 'd3',
@@ -93,7 +82,24 @@
secure: false
}
}
- }
+ },
+ plugins: [
+ new webpack.DefinePlugin({
+ DEV: true,
+ DEBUG: true
+ }),
+ new webpack.HotModuleReplacementPlugin(),
+ new webpack.LoaderOptionsPlugin({
+ options: {
+ eslint: {
+ failOnWarning: false,
+ failOnError: false,
+ configFile: 'eslintrc.json'
+ },
+ context: '/'
+ }
+ })
+ ]
};
module.exports = config;