diff --git a/.eslintignore b/.eslintignore index 989e613fb..964b87b68 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,6 @@ /js/tests/* /js/vendor/* +/js/legacy/* /js/node_modules/* /js/public/* /karma.conf.js diff --git a/js/webpack.config.js b/js/webpack.config.js index 72d629500..13f3cf73f 100644 --- a/js/webpack.config.js +++ b/js/webpack.config.js @@ -1,6 +1,6 @@ const path = require('path'); const webpack = require('webpack'); -const MiniCssExtractPlugin = require("mini-css-extract-plugin"); +const MiniCssExtractPlugin = require('mini-css-extract-plugin'); module.exports = { node: { @@ -27,7 +27,7 @@ module.exports = { test: /\.css$/, use: [ MiniCssExtractPlugin.loader, - "css-loader" + 'css-loader' ] } ] @@ -38,25 +38,26 @@ module.exports = { /* separate vendor chunk for node_modules and legacy scripts */ commons: { test: /[\\/]node_modules[\\/]/, - name: "vendor", - chunks: "all" + name: 'vendor', + chunks: 'all' }, legacy: { test: /[\\/]legacy[\\/]/, - name: "vendor", - chunks: "all" + name: 'vendor', + chunks: 'all' } } } }, + /* use external jQuery from server */ externals: { - "jquery": "jQuery" + 'jquery': 'jQuery' }, plugins: [ - new MiniCssExtractPlugin('css/[name].css'), + new MiniCssExtractPlugin('[name].css'), new webpack.ProvidePlugin({ - $: "jquery", - jQuery: "jquery" + $: 'jquery', + jQuery: 'jquery' }) ] };