Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit78d35e1

Browse files
webpack v3 -> v4 and vue-loader v14 ->v15
1 parent0d0e2d7 commit78d35e1

File tree

3 files changed

+2675
-1396
lines changed

3 files changed

+2675
-1396
lines changed

‎build/webpack.build.config.js

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ var webpack = require('webpack')
33
constFriendlyErrorsWebpackPlugin=require('friendly-errors-webpack-plugin')
44
constExtractTextPlugin=require('extract-text-webpack-plugin')
55
constStylelintPlugin=require('stylelint-webpack-plugin')
6+
constUglifyJsPlugin=require('uglifyjs-webpack-plugin')
7+
constMiniCssExtractPlugin=require('mini-css-extract-plugin')
68

79
module.exports={
10+
mode:'production',
811
entry:'./components/index.js',
912
output:{
1013
path:path.resolve(__dirname,'../dist'),
@@ -19,6 +22,13 @@ module.exports = {
1922
'public':path.resolve(__dirname,'./public')
2023
}
2124
},
25+
optimization:{
26+
minimizer:[
27+
newUglifyJsPlugin({
28+
sourceMap:false
29+
})
30+
]
31+
},
2232
module:{
2333
noParse:/es6-promise\.js$/,// avoid webpack shimming process
2434
rules:[
@@ -49,10 +59,11 @@ module.exports = {
4959
},
5060
{
5161
test:/\.css$/,
52-
use:ExtractTextPlugin.extract({
53-
use:['css-loader']
54-
})
55-
}
62+
use:[
63+
MiniCssExtractPlugin.loader,
64+
'css-loader'
65+
]
66+
},
5667
]
5768
},
5869
devServer:{
@@ -67,7 +78,9 @@ module.exports = {
6778
newFriendlyErrorsWebpackPlugin({
6879
clearConsole:true
6980
}),
70-
newExtractTextPlugin('carvue.min.css'),
81+
newMiniCssExtractPlugin({
82+
filename:'carvue.min.css'
83+
}),
7184
newStylelintPlugin({
7285
files:['**/*.vue']
7386
})
@@ -82,12 +95,6 @@ if (process.env.NODE_ENV === 'production') {
8295
NODE_ENV:'"production"',
8396
}
8497
}),
85-
newwebpack.optimize.UglifyJsPlugin({
86-
sourceMap:true,
87-
compress:{
88-
warnings:false
89-
}
90-
}),
9198
newwebpack.LoaderOptionsPlugin({
9299
minimize:true
93100
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp