Last active
January 23, 2017 03:01
-
-
Save j138/6982f033467690b8c336a4ca951b899f to your computer and use it in GitHub Desktop.
webpack v1からv2への以降作業 簡易まとめ ref: http://qiita.com/Jey/items/9b7fa193336e53dc6120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/webpack.config.babel.js b/webpack.config.babel.js | |
index f5cbd1a..8ae3f3a 100644 | |
--- a/webpack.config.babel.js | |
+++ b/webpack.config.babel.js | |
@@ -1,5 +1,4 @@ | |
module.exports = { | |
cache: true, | |
- debug: true, | |
devtool: 'inline-source-map', | |
}; | |
@@ -22,15 +22,12 @@ const common = { | |
headers: { 'Access-Control-Allow-Origin': '*' }, | |
}, | |
module: { | |
- preLoaders: [ | |
- { test: /\.jsx?$/, exclude: /node_modules/, loader: 'eslint' }, | |
- ], | |
- loaders: [ | |
- { test: /\.jsx?$/, exclude: /node_modules/, loaders: ['react-hot-loader/webpack', 'babel'] }, | |
- { test: /\.css$/, loaders: ['style', 'css'] }, | |
- { test: /\.json/, loader: 'json' }, | |
- { test: /\.(eot|ttf|woff|woff2)$/, loader: 'file?name=material-design-icons/iconfont/[name].[ext]' }, | |
- { test: /\.(jpe?g|png|gif|svg)$/, loader: 'url?limit=10000' }, | |
+ rules: [ | |
+ { test: /\.jsx?$/, enforce: 'pre', exclude: /node_modules/, loader: 'eslint-loader' }, | |
+ { test: /\.jsx?$/, exclude: /node_modules/, use: ['react-hot-loader/webpack', 'babel-loader'] }, | |
+ { test: /\.css$/, use: ['style-loader', 'css-loader'] }, | |
+ { test: /\.(eot|ttf|woff|woff2)$/, loader: 'file-loader?name=material-design-icons/iconfont/[name].[ext]' }, | |
+ { test: /\.(jpe?g|png|gif|svg)$/, loader: 'url-loader?limit=10000' }, | |
], | |
}, | |
stats: { | |
@@ -54,10 +51,7 @@ const common = { | |
}), | |
], | |
resolve: { | |
- extensions: ['', '.js', '.jsx'], | |
- }, | |
- eslint: { | |
- configFile: './.eslintrc', | |
+ extensions: ['.js', '.jsx'], | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment