source-replacement-webpack-plugin
v4.2.0
Published
[![semantic-release](https://img.shields.io/badge/semantic-release-e10079.svg?logo=semantic-release)](https://github.com/semantic-release/semantic-release) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https
Downloads
4
Readme
Source Replacement Webpack Plugin
Webpack Plugin to bundle source-replacement script to your app.
*** Beware yourself, don't use this in production build ***
Installation
yarn add --dev source-replacement-webpack-plugin
Usage
In your webpack config
const { SourceReplacementPlugin } = require('source-replacement-webpack-plugin')
module.exports = {
...
plugins: [
...,
new SourceReplacementPlugin()
]
}
custom entry name
const { SourceReplacementPlugin } = require('source-replacement-webpack-plugin')
module.exports = {
...
plugins: [
...,
new SourceReplacementPlugin('main') // default is 'client'
]
}
On your browser
Enter page with the following example
https://example.com/#replacementTarget=https://your-target-js-source-url