Webpack update 1.12.14 -> 3.6.0

nolan/hinaloe-test
Igor Lobanov 2017-09-17 10:33:59 +03:00
parent 9bf9eb699f
commit ce77166134
3 changed files with 29 additions and 9 deletions

View File

@ -10,10 +10,10 @@ module.exports = {
}, },
module: { module: {
loaders: [ rules: [
{ {
test: /\.js$/, test: /\.js$/,
loader: 'babel-loader', use: 'babel-loader',
include: [ include: [
path.resolve('src'), path.resolve('src'),
path.resolve('node_modules/measure-scrollbar'), path.resolve('node_modules/measure-scrollbar'),
@ -23,7 +23,17 @@ module.exports = {
}, },
{ {
test: /\.svg$/, test: /\.svg$/,
loaders: ['babel?presets[]=react', 'svg-jsx?es6=true'], use: [
{
loader: 'babel-loader'
},
{
loader: 'svg-jsx-loader',
options: {
es6: true
}
},
],
include: [ include: [
path.resolve('src/svgs'), path.resolve('src/svgs'),
], ],
@ -32,7 +42,7 @@ module.exports = {
}, },
resolve: { resolve: {
extensions: ['', '.js'], extensions: ['.js'],
}, },
plugins: [ plugins: [

View File

@ -52,7 +52,7 @@
"rimraf": "2.5.2", "rimraf": "2.5.2",
"size-limit": "^0.11.1", "size-limit": "^0.11.1",
"svg-jsx-loader": "^0.0.16", "svg-jsx-loader": "^0.0.16",
"webpack": "1.12.14" "webpack": "3.6.0"
}, },
"scripts": { "scripts": {
"clean": "rimraf data/data.js dist/", "clean": "rimraf data/data.js dist/",

View File

@ -18,10 +18,10 @@ var config = {
externals: [], externals: [],
module: { module: {
loaders: [ rules: [
{ {
test: /\.js$/, test: /\.js$/,
loader: 'babel-loader', use: 'babel-loader',
include: [ include: [
path.resolve('src'), path.resolve('src'),
path.resolve('node_modules/measure-scrollbar'), path.resolve('node_modules/measure-scrollbar'),
@ -30,7 +30,17 @@ var config = {
}, },
{ {
test: /\.svg$/, test: /\.svg$/,
loaders: ['babel?presets[]=react', 'svg-jsx?es6=true'], use: [
{
loader: 'babel-loader'
},
{
loader: 'svg-jsx-loader',
options: {
es6: true
}
},
],
include: [ include: [
path.resolve('src/svgs'), path.resolve('src/svgs'),
], ],
@ -39,7 +49,7 @@ var config = {
}, },
resolve: { resolve: {
extensions: ['', '.js'], extensions: ['.js'],
}, },
plugins: [ plugins: [