A plugin that you can use to replace strings in your code.
Import ReplacePlugin
const {
start,
builtInPlugins: {
ReplacePlugin
}
} = require('reboost');
Add it to the plugins array
const {
start,
builtInPlugins: {
ReplacePlugin
}
} = require('reboost');
start({
plugins: [
ReplacePlugin({
'to-replace': 'replacement'
})
]
})
If you want to replace process.env.NODE_ENV
with production
const {
start,
builtInPlugins: {
ReplacePlugin
}
} = require('reboost');
start({
plugins: [
ReplacePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
})
]
})