diff --git a/ui/webpack.config.js b/ui/webpack.config.js index fe3bd5c99..b9267fd29 100644 --- a/ui/webpack.config.js +++ b/ui/webpack.config.js @@ -16,8 +16,8 @@ module.exports = { }, devtool: 'source-map', resolve: { - root: appPath, - extensions: ['', '.js', '.jsx', '.css'], + modules: [appPath, "node_modules"], + extensions: ['.js', '.jsx', '.css'] }, plugins: [ new webpack.DefinePlugin({ @@ -25,28 +25,29 @@ module.exports = { }), ], module: { - preLoaders: [ + rules: [ { test: /\.jsx?$/, + enforce: "pre", loaders: ['eslint'], // define an include so we check just the files we need include: PATHS.app - } - ], - loaders: [ - { test: /\.css$/, loader: "style!css" }, + }, + { + test: /\.css$/, + use: ["style-loader", "css-loader"] + }, { test: /\.jsx?$/, - loader: 'babel', - query: { - cacheDirectory: true, - presets:[ 'es2015', 'react', 'stage-2' ] + exclude: /node_modules/, + use: { + loader: 'babel-loader', + options: { + cacheDirectory: true, + presets: [ 'es2015', 'react', 'stage-2' ] + } } - }, - { - test: /mime\.json$/, - loader: 'json', - }, + } ] }, target: 'electron-main',