1
0
mirror of https://github.com/trambarhq/relaks-wordpress-example.git synced 2025-09-02 20:52:33 +02:00

Fixed routing.

Loading data for page.
Added rudimentary slug handling to data source.
This commit is contained in:
Chung Leong
2018-12-23 01:58:36 +01:00
parent 47a8742623
commit 861a89bc8e
14 changed files with 191 additions and 35 deletions

View File

@@ -16,6 +16,7 @@ var clientConfig = {
entry: './main',
output: {
path: Path.resolve('./server/www'),
publicPath: '/',
filename: 'app.js',
},
resolve: {
@@ -106,16 +107,7 @@ if (isDevServer) {
// config dev-server to support client-side routing
clientConfig.devServer = {
inline: true,
historyApiFallback: {
rewrites: [
{
from: /.*/,
to: function(context) {
return context.parsedUrl.pathname.replace(/.*\/(.*)$/, '/$1');
}
}
]
}
historyApiFallback: true,
};
}