Fix basepath

This commit is contained in:
Paulo Gustavo Veiga 2020-12-08 19:44:12 -08:00
parent dc3e5ebcbe
commit e5866a9e4e
2 changed files with 11 additions and 6 deletions

View File

@ -25,7 +25,7 @@
Learn how to configure a non-root public URL by running `npm run build`. Learn how to configure a non-root public URL by running `npm run build`.
--> -->
<base url="<%=PUBLIC_URL%>" /> <base href="<%=PUBLIC_URL%>" />
<title>Loading | WiseMapping</title> <title>Loading | WiseMapping</title>
</head> </head>

View File

@ -49,7 +49,7 @@ module.exports = {
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
template: path.join(__dirname, 'public/index.html'), template: path.join(__dirname, 'public/index.html'),
templateParameters: { templateParameters: {
PUBLIC_URL: process.env.PUBLIC_URL ? process.env.PUBLIC_URL : '/' PUBLIC_URL: process.env.PUBLIC_URL ? process.env.PUBLIC_URL : 'http://localhost:3000'
}, },
}) })
], ],
@ -57,6 +57,11 @@ module.exports = {
contentBase: path.join(__dirname, 'dist'), contentBase: path.join(__dirname, 'dist'),
compress: true, compress: true,
port: 3000, port: 3000,
hot: true hot: true,
historyApiFallback: {
rewrites: [
{ from: /^\/c\//, to: '/index.html' }
]
}
} }
} }