-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9e37d4
commit 283626d
Showing
6 changed files
with
58 additions
and
38 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
var path = require('path'); | ||
|
||
const config = { | ||
dev: { | ||
env: "dev", | ||
port: 8080, | ||
autoOpenBrowser: true, | ||
assetsRoot: path.resolve(__dirname, '../dist'), | ||
assetsSubDirectory: 'static', | ||
assetsPublicPath: '/', | ||
proxyTable: {}, | ||
// CSS Sourcemaps off by default because relative paths are "buggy" | ||
// with this option, according to the CSS-Loader README | ||
// (https://github.com/webpack/css-loader#sourcemaps) | ||
// In our experience, they generally work as expected, | ||
// just be aware of this issue when enabling this option. | ||
cssSourceMap: false | ||
}, | ||
prod: { | ||
env: "prod", | ||
index: path.resolve(__dirname, '../dist/index.html'), | ||
assetsRoot: path.resolve(__dirname, '../dist'), | ||
assetsSubDirectory: 'static', | ||
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'], | ||
// Run the build command with an extra argument to | ||
// View the bundle analyzer report after build finishes: | ||
// `npm run build --report` | ||
// Set to `true` or `false` to always turn it on or off | ||
bundleAnalyzerReport: process.env.npm_config_report | ||
}, | ||
}; | ||
|
||
module.exports = config; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,10 @@ | ||
const config = { | ||
module.exports = { | ||
devtool: '#cheap-module-eval-source-map', | ||
devServer: { | ||
historyApiFallback: true, | ||
noInfo: true | ||
}, | ||
performance: { | ||
hints: false | ||
}, | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
NODE_ENV: '"development"' | ||
} | ||
}), | ||
] | ||
}; | ||
|
||
module.exports = config; | ||
} | ||
}; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// import Vue from 'vue' | ||
// import App from './App.vue' | ||
import Vue from 'vue'; | ||
import App from './App.vue'; | ||
|
||
// new Vue({ | ||
// el: '#app', | ||
// render: h => h(App) | ||
// }) | ||
new Vue({ | ||
el: '#app', | ||
render: h => h(App) | ||
}); | ||
console.log('Hello World!'); |