-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.o3.js
29 lines (28 loc) · 915 Bytes
/
webpack.o3.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const merge = require('webpack-merge');
const parentWebPack = require('./webpack.common.js');
const StringReplacePlugin = require('string-replace-webpack-plugin')
const path = require('path');
module.exports = merge(parentWebPack, {
entry: {
"./Option": path.join(__dirname, './src/js/Option03.ts')
},
module: {
rules: [
{
test: /\.ts$/,
use: [{
loader: StringReplacePlugin.replace({
replacements: [{
pattern: /Logger.log(.+)/g,
replacement: function (_match, _p1, _offset, _string) { console.log("Replace happend"); return ""; }
}]
})
}]
}
]
},
plugins: [
// an instance of the plugin must be present
new StringReplacePlugin()
]
});