summaryrefslogtreecommitdiffstats
path: root/dox-sequence-diagram-ui/webpack.config.js
diff options
context:
space:
mode:
authorsvishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>2018-01-22 08:43:04 +0200
committersvishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>2018-01-22 08:43:09 +0200
commit10c74ee2fbccabd7a109c91ed47c8e11d61d411e (patch)
treebdebed7cfa79441f6159198a1326bd7fa3d323b5 /dox-sequence-diagram-ui/webpack.config.js
parent0d08f881e492579a6e8d8cfd6e6752c7044663b5 (diff)
dox-sequence webpack version upgrade
Issue-ID: SDC-944 Change-Id: I3a23ac40a83835ee73addc9812f6634f49cc3553 Signed-off-by: svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
Diffstat (limited to 'dox-sequence-diagram-ui/webpack.config.js')
-rw-r--r--dox-sequence-diagram-ui/webpack.config.js96
1 files changed, 51 insertions, 45 deletions
diff --git a/dox-sequence-diagram-ui/webpack.config.js b/dox-sequence-diagram-ui/webpack.config.js
index 94850ec297..72a483724a 100644
--- a/dox-sequence-diagram-ui/webpack.config.js
+++ b/dox-sequence-diagram-ui/webpack.config.js
@@ -24,53 +24,42 @@ var config = {
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 @@ var config = {
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;