1.0.4 • Published 5 years ago
flightworker-webpack-relative v1.0.4
flightworker-webpack-relative
npm i --save flightworker-webpack-relative
example
const Relative = require('flightworker-webpack-relative')
const webpackConfig = {
plugins: [
new Relative({
// 文件根目录
path: __dirname,
// 替换地址
replacePath: `window.host`,
// 忽略规则
ignore: /\.build\.js$/,
// 匹配规则
rules: [
{
test: /w\.p+/,
use: 'this is replace'
}
]
})
]
}