diff --git a/example/webpack.config.js b/example/webpack.config.js index f651b40..9ddd1de 100644 --- a/example/webpack.config.js +++ b/example/webpack.config.js @@ -10,10 +10,10 @@ module.exports = { }, module: { - loaders: [ + rules: [ { test: /\.js$/, - loader: 'babel-loader', + use: 'babel-loader', include: [ path.resolve('src'), path.resolve('node_modules/measure-scrollbar'), @@ -23,7 +23,17 @@ module.exports = { }, { test: /\.svg$/, - loaders: ['babel?presets[]=react', 'svg-jsx?es6=true'], + use: [ + { + loader: 'babel-loader' + }, + { + loader: 'svg-jsx-loader', + options: { + es6: true + } + }, + ], include: [ path.resolve('src/svgs'), ], @@ -32,7 +42,7 @@ module.exports = { }, resolve: { - extensions: ['', '.js'], + extensions: ['.js'], }, plugins: [ diff --git a/package.json b/package.json index 7818ae6..63770c6 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "rimraf": "2.5.2", "size-limit": "^0.11.1", "svg-jsx-loader": "^0.0.16", - "webpack": "1.12.14" + "webpack": "3.6.0" }, "scripts": { "clean": "rimraf data/data.js dist/", diff --git a/src/webpack.config.js b/src/webpack.config.js index cfde318..e8c4cce 100644 --- a/src/webpack.config.js +++ b/src/webpack.config.js @@ -18,10 +18,10 @@ var config = { externals: [], module: { - loaders: [ + rules: [ { test: /\.js$/, - loader: 'babel-loader', + use: 'babel-loader', include: [ path.resolve('src'), path.resolve('node_modules/measure-scrollbar'), @@ -30,7 +30,17 @@ var config = { }, { test: /\.svg$/, - loaders: ['babel?presets[]=react', 'svg-jsx?es6=true'], + use: [ + { + loader: 'babel-loader' + }, + { + loader: 'svg-jsx-loader', + options: { + es6: true + } + }, + ], include: [ path.resolve('src/svgs'), ], @@ -39,7 +49,7 @@ var config = { }, resolve: { - extensions: ['', '.js'], + extensions: ['.js'], }, plugins: [