Created
February 15, 2017 02:16
-
-
Save yuroyoro/221224204f65d8e3fddaf293e5571265 to your computer and use it in GitHub Desktop.
webpakcer.gemにscssのビルドを加えて、大きめの依存ライブラリを別ファイルに分けて吐くようにしたwebpack.cnofig
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
// Note: You must restart bin/webpack-watcher for changes to take effect | |
var path = require('path') | |
var webpack = require('webpack') | |
var merge = require('webpack-merge') | |
var config = require('./shared.js') | |
var devconfig = { | |
devtool: 'sourcemap', | |
stats: { | |
errorDetails: true | |
}, | |
output: { | |
pathinfo: true | |
}, | |
plugins: [ | |
new webpack.LoaderOptionsPlugin({ | |
debug: true | |
}) | |
] | |
} | |
module.exports = [merge(config[0], devconfig), merge(config[1], devconfig)] |
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
// Note: You must restart bin/webpack-watcher for changes to take effect | |
var path = require('path') | |
var webpack = require('webpack') | |
var merge = require('webpack-merge') | |
var config = require('./shared.js') | |
module.exports = [ | |
merge(config[0], { | |
output: { filename: '[name]-[hash].js' }, | |
plugins: [ | |
new webpack.LoaderOptionsPlugin({ | |
minimize: true | |
}) | |
] | |
}), | |
merge(config[1], { | |
output: { filename: '[name]-[hash].css' }, | |
plugins: [ | |
new webpack.LoaderOptionsPlugin({ | |
minimize: true | |
}) | |
] | |
}) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment