Commit 06f72f5c authored by Evan You's avatar Evan You

tweak build

parent 636edadf
...@@ -3,16 +3,14 @@ const vueConfig = require('./vue-loader.config') ...@@ -3,16 +3,14 @@ const vueConfig = require('./vue-loader.config')
module.exports = { module.exports = {
devtool: '#source-map', devtool: '#source-map',
entry: { entry: './src/client-entry.js',
app: './src/client-entry.js',
vendor: ['vue', 'vue-router', 'vuex', 'firebase', 'lru-cache', 'es6-promise']
},
output: { output: {
path: path.resolve(__dirname, '../dist'), path: path.resolve(__dirname, '../dist'),
publicPath: '/dist/', publicPath: '/dist/',
filename: 'client-bundle.js' filename: 'client-bundle.js'
}, },
module: { module: {
noParse: /(lru-cache|es6-promise)\.js$/,
rules: [ rules: [
{ {
test: /\.vue$/, test: /\.vue$/,
......
...@@ -7,11 +7,6 @@ const config = Object.assign({}, base, { ...@@ -7,11 +7,6 @@ const config = Object.assign({}, base, {
// strip comments in Vue code // strip comments in Vue code
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development') 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
}),
// extract vendor chunks for better caching
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
filename: 'client-vendor-bundle.js'
}) })
]) ])
}) })
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
</head> </head>
<body> <body>
{{ APP }} {{ APP }}
<script src="/dist/client-vendor-bundle.js"></script>
<script src="/dist/client-bundle.js"></script> <script src="/dist/client-bundle.js"></script>
</body> </body>
</html> </html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment