Update webpack configuration to work with webpack 4
This commit is contained in:
parent
d4432b9a39
commit
88d2457e29
5 changed files with 488 additions and 296 deletions
|
|
@ -37,7 +37,7 @@
|
||||||
"eslint": "^4.16.0",
|
"eslint": "^4.16.0",
|
||||||
"eslint-plugin-flowtype": "^2.42.0",
|
"eslint-plugin-flowtype": "^2.42.0",
|
||||||
"eslint-plugin-react": "^7.6.1",
|
"eslint-plugin-react": "^7.6.1",
|
||||||
"extract-text-webpack-plugin": "^3.0.2",
|
"extract-text-webpack-plugin": "next",
|
||||||
"file-loader": "^1.1.5",
|
"file-loader": "^1.1.5",
|
||||||
"flow": "^0.2.3",
|
"flow": "^0.2.3",
|
||||||
"flow-bin": "^0.68.0",
|
"flow-bin": "^0.68.0",
|
||||||
|
|
@ -47,8 +47,6 @@
|
||||||
"lodash-webpack-plugin": "^0.11.4",
|
"lodash-webpack-plugin": "^0.11.4",
|
||||||
"style-loader": "^0.20.1",
|
"style-loader": "^0.20.1",
|
||||||
"webpack": "^4.3.0",
|
"webpack": "^4.3.0",
|
||||||
"webpack-dev-server": "^3.1.1",
|
|
||||||
"webpack": "^4.3.0",
|
|
||||||
"webpack-cli": "^2.0.13",
|
"webpack-cli": "^2.0.13",
|
||||||
"webpack-dev-server": "^3.1.1",
|
"webpack-dev-server": "^3.1.1",
|
||||||
"webpack-merge": "^4.1.1",
|
"webpack-merge": "^4.1.1",
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ module.exports = {
|
||||||
filename: '[name]-[chunkhash].js'
|
filename: '[name]-[chunkhash].js'
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
rules: [
|
||||||
{ test: /\.(woff2?|eot|ttf|svg)$/, loader: "file-loader" }
|
{ test: /\.(woff2?|eot|ttf|svg)$/, loader: "file-loader" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ module.exports = env => merge(common, {
|
||||||
path.resolve(__dirname, 'src/index.jsx')]
|
path.resolve(__dirname, 'src/index.jsx')]
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
rules: [
|
||||||
{ test: /\.css$/, use: extractCSS },
|
{ test: /\.css$/, use: extractCSS },
|
||||||
{ test: /\.js(x)?$/, exclude: /node_modules/, loader: "babel-loader?cacheDirectory=true" }
|
{ test: /\.js(x)?$/, exclude: /node_modules/, loader: "babel-loader?cacheDirectory=true" }
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ module.exports = env => merge(common, {
|
||||||
path.resolve(__dirname, 'src/index.jsx')],
|
path.resolve(__dirname, 'src/index.jsx')],
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
rules: [
|
||||||
{ test: /\.css$/, use: extractCSS },
|
{ test: /\.css$/, use: extractCSS },
|
||||||
{ test: /\.js(x)?$/, exclude: /node_modules/, loader: "babel-loader" }
|
{ test: /\.js(x)?$/, exclude: /node_modules/, loader: "babel-loader" }
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue