1.2.0 • Published 6 years ago
str-webpack-plugin v1.2.0
str-webpack-plugin
str-webpack-plugin
Getting started
- make sure node and npm installed;
Install
> npm install str-webpack-plugin --save
Usage
webpack.config.js
//webpack.config.js
var path = require('path');
var strPlugin = require('str-webpack-plugin');
module.exports = {
...
plugins: [
new strPlugin({
src: path.resolve('./dist'),
test: /\.js/g,
replace: [{
form: ["foo"],
to: ["bar"],
}]
})
]
...
}