aboutsummaryrefslogtreecommitdiffstats
path: root/dox-sequence-diagram-ui/webpack.config.js
diff options
context:
space:
mode:
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;