mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-04-22 23:54:49 +00:00
Improve build flow
This commit is contained in:
parent
c60f0b7672
commit
757735f8a8
3 changed files with 3 additions and 10 deletions
|
|
@ -20,7 +20,6 @@ spinner.start()
|
|||
var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
|
||||
rm('-rf', assetsPath)
|
||||
mkdir('-p', assetsPath)
|
||||
cp('-R', 'static/', assetsPath)
|
||||
|
||||
webpack(webpackConfig, function (err, stats) {
|
||||
spinner.stop()
|
||||
|
|
|
|||
|
|
@ -43,9 +43,7 @@ var webpackConfig = merge(baseWebpackConfig, {
|
|||
// you can customize output by editing /index.html
|
||||
// see https://github.com/ampedandwired/html-webpack-plugin
|
||||
new HtmlWebpackPlugin({
|
||||
filename: process.env.NODE_ENV === 'testing'
|
||||
? 'index.html'
|
||||
: config.build.index,
|
||||
filename: process.env.NODE_ENV === 'testing' ? 'index.html' : config.build.index,
|
||||
template: 'index.html',
|
||||
inject: true,
|
||||
minify: {
|
||||
|
|
|
|||
|
|
@ -6,20 +6,16 @@ module.exports = {
|
|||
env: require('./prod.env'),
|
||||
index: path.resolve(__dirname, '../dist/index.html'),
|
||||
assetsRoot: path.resolve(__dirname, '../dist'),
|
||||
assetsSubDirectory: 'static',
|
||||
assetsSubDirectory: '',
|
||||
assetsPublicPath: '/',
|
||||
productionSourceMap: true,
|
||||
// Gzip off by default as many popular static hosts such as
|
||||
// Surge or Netlify already gzip all static assets for you.
|
||||
// Before setting to `true`, make sure to:
|
||||
// npm install --save-dev compression-webpack-plugin
|
||||
productionGzip: false,
|
||||
productionGzipExtensions: ['js', 'css']
|
||||
},
|
||||
dev: {
|
||||
env: require('./dev.env'),
|
||||
port: 8080,
|
||||
assetsSubDirectory: 'static',
|
||||
assetsSubDirectory: '',
|
||||
assetsPublicPath: '/',
|
||||
proxyTable: {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue