I have following dev-server configuration
devServer: {
port: 3000,
host: '0.0.0.0',
watchOptions: {
aggregateTimeout: 300,
poll: 1000,
},
compress: true,
inline: true,
contentBase: BUILD_PATH,
historyApiFallback: true,
}
Where
BUILD_PATH = path.resolve(__dirname, '../build/webapp')
The problem is that ../build/webapp folder is empty when dev-server started.
As result application loading fine (index.html, bundle.js) but cannot load any fonts or other resources which should be located in assets subfolder.
And if i run just webpack - everything appears in that folder. After webpack i can start dev-server and everything good.
Dev-server logs:
Project is running at http://0.0.0.0:3000/
webpack output is served from /
Content not from webpack is served from D:\Development\Projects\myproject\build\webapp
404s will fallback to /index.html
10% building modules 5/8 modules 3 active
...oject\webapp\node_modules\url\url.js(node:5560)
63% building modules 746/839 modules 93 active ...node_modules\lodash-es\_freeGlob
al.js
Any ideas ?