Reputation: 2811
I currently use webpack-dev-server to serve a bundle of javascript packed by webpack. There are a few files that I would like served via the dev server, but not bundled in the with the rest. Is there a way to expose a route that does this? For instance:
/bundle.js <--- normal webpack bundle
/other-resources/file-a.js
/other-resources/file-b.js
I've checked out the documentation but after reading it I'm not sure if it actually supports it.
Upvotes: 2
Views: 109
Reputation: 13097
I think you can do this with the file-loader, as follows:
require("file?name=other-resources/file-a.[ext]!./file-a.js");
Upvotes: 1