webpack-prepend-devserver-url
v0.1.0
Published
Plugin prepends dev server's URL to emitted files.
Downloads
2
Maintainers
Readme
PrependDevServerURL prepends URL of webpack's devserver to URLs of emitted files.
For example: if URL of dev server is http://localhost:8080/
and emitted file is js/main.js
then resulting URL will be
http://localhost:8080/js/main.js
.
The plugin works only in watch mode and when devServer.hot
option is enabled.
Installation
yarn add webpack-prepend-devserver-url
Setup
Add plugin to your webpack config:
// webpack.config.js
const PrependDevServerURL = require('webpack-prepend-devserver-url');
module.exports = {
plugins: [
new PrependDevServerURL(),
// other plugins
],
}