Skip to content

Commit c50a397

Browse files
committed
修改部分配置
1 parent 7f72557 commit c50a397

File tree

6 files changed

+22
-9
lines changed

6 files changed

+22
-9
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@ yarn-error.log*
1111
*.ntvs*
1212
*.njsproj
1313
*.sln
14+
15+
16+
src/components/test*
17+
src/main.js
18+
src/App.vue
19+
src/components/HelloWorld.vue
20+
src/router.js

build/webpack.base.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = {
1919
},
2020
output: {
2121
path: config.build.assetsRoot,
22-
filename: 'tab-slider.min.js',
22+
filename: process.env.NODE_ENV === 'production' ? 'tab-slider.min.js' : '[name].js',
2323
publicPath: process.env.NODE_ENV === 'production'
2424
? config.build.assetsPublicPath
2525
: config.dev.assetsPublicPath

build/webpack.dev.conf.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const merge = require('webpack-merge')
66
const path = require('path')
77
const baseWebpackConfig = require('./webpack.base.conf')
88
const CopyWebpackPlugin = require('copy-webpack-plugin')
9-
// const HtmlWebpackPlugin = require('html-webpack-plugin')
9+
const HtmlWebpackPlugin = require('html-webpack-plugin')
1010
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
1111
const portfinder = require('portfinder')
1212

@@ -52,11 +52,11 @@ const devWebpackConfig = merge(baseWebpackConfig, {
5252
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
5353
new webpack.NoEmitOnErrorsPlugin(),
5454
// https://github.com/ampedandwired/html-webpack-plugin
55-
// new HtmlWebpackPlugin({
56-
// filename: 'index.html',
57-
// template: 'index.html',
58-
// inject: true
59-
// }),
55+
new HtmlWebpackPlugin({
56+
filename: 'index.html',
57+
template: 'index.html',
58+
inject: true
59+
}),
6060
// copy custom static assets
6161
new CopyWebpackPlugin([
6262
{

config/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module.exports = {
5757
// Surge or Netlify already gzip all static assets for you.
5858
// Before setting to `true`, make sure to:
5959
// npm install --save-dev compression-webpack-plugin
60-
productionGzip: true,
60+
productionGzip: false,
6161
productionGzipExtensions: ['js', 'css'],
6262

6363
// Run the build command with an extra argument to

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
},
1313
"dependencies": {
1414
"compression-webpack-plugin": "^1.1.11",
15-
"vue": "^2.5.2"
15+
"vue": "^2.5.2",
16+
"vue-router": "^3.0.1"
1617
},
1718
"devDependencies": {
1819
"node-sass": "^4.8.3",

0 commit comments

Comments
 (0)