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:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user