Update Webpack to version 4

This commit is contained in:
MTRNord 2018-04-27 11:32:59 +02:00
parent 2dc1c5c618
commit 02a185f2fe
No known key found for this signature in database
GPG key ID: E5B89311FAB91B9F
4 changed files with 53 additions and 28 deletions

View file

@ -33,8 +33,8 @@ const olm_entry = webpack_config.entry['olm'];
delete webpack_config['entry'];
// add ./test as a search path for js
webpack_config.module.loaders.unshift({
test: /\.js$/, loader: "babel",
webpack_config.module.rules.unshift({
test: /\.js$/, use: "babel-loader",
include: [path.resolve('./src'), path.resolve('./test')],
});
@ -46,8 +46,9 @@ webpack_config.module.noParse.push(/sinon\/pkg\/sinon\.js$/);
// ?
webpack_config.resolve.alias['sinon'] = 'sinon/pkg/sinon.js';
webpack_config.resolve.root = [
webpack_config.resolve.modules = [
path.resolve('./test'),
"node_modules"
];
webpack_config.devtool = 'inline-source-map';