Skip to content

Commit 2c0b79a

Browse files
committed
WebpackDevServer and including .js-files
1 parent 1a60faf commit 2c0b79a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

webpack/config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,17 @@ if (ENV === 'development') {
4949
plugins: [],
5050

5151
devServer: {
52-
contentBase: path.join(__dirname, '../demo/'),
52+
// contentBase: path.join(__dirname, '../demo/'),
53+
historyApiFallback: {
54+
rewrites: [
55+
{ from: /^\/$/, to: '/demo/index.html' },
56+
{ from: /\/index\.html$/, to: '/demo/index.html' },
57+
{ from: /\/css\/style\.css$/, to: '/demo/css/style.css' },
58+
{ from: /\/css\/bootstrap\.css$/, to: '/demo/css/bootstrap.css' },
59+
{ from: /\/serviceDatasource\/serviceDatasource\.html$/, to: '/demo/serviceDatasource/serviceDatasource.html' },
60+
{ from: /\/serviceDatasource\/serviceDatasource\.js$/, to: '/demo/serviceDatasource/serviceDatasource.js' }
61+
]
62+
},
5363
inline: true,
5464
quiet: false,
5565
hot: true,

0 commit comments

Comments
 (0)