Invalid path to file on windows platform.
Mavrin opened this issue · 3 comments
Mavrin commented
Mavrin commented
I found decision. I set rewrite rules for path to file.
lahmatiy commented
Could you share how rule looks?
Mavrin commented
I use express
for server api and generating html pages and webpack devserver in develompent mode for assets.
I have next files structure and I run server from app
folder
The rule looks like:
var server = new WebpackDevServer(compiler, {
...
proxy: {
'*public/js/*': {
target: pathToTargetServer,
rewrite: function(req) {
req.url = req.url.replace(/.+public\//, '');
}
},
'*': pathToTargetServer
},
publicPath: '/assets/',
setup(app) {
app.use(openInEditor());
}
});