Skip to content

Commit

Permalink
update package and webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben committed Oct 4, 2017
1 parent 29b638a commit 829a367
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/router/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ const routes = [
];

const router = new VueRouter({
base: __dirname + "/",
mode: "history",
base: __dirname + "/skatelocate/",
routes
});

Expand Down
14 changes: 11 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
var path = require("path")
var webpack = require("webpack")
var path = require("path");
var webpack = require("webpack");
var PrerenderSpaPlugin = require('prerender-spa-plugin');


module.exports = {
entry: "./src/main.js",
Expand Down Expand Up @@ -74,6 +76,12 @@ if (process.env.NODE_ENV === 'production') {
new webpack.LoaderOptionsPlugin({
minimize: true
}),
new webpack.optimize.ModuleConcatenationPlugin()
new webpack.optimize.ModuleConcatenationPlugin(),
new PrerenderSpaPlugin(
// Path to compiled app
path.join(__dirname, './dist'),
// List of endpoints you wish to prerender
[ '/' ]
)
])
}

0 comments on commit 829a367

Please sign in to comment.