-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebpack.common.js
More file actions
35 lines (33 loc) · 832 Bytes
/
Copy pathwebpack.common.js
File metadata and controls
35 lines (33 loc) · 832 Bytes
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
30
31
32
33
34
35
const path = require('path');
const webpack = require('webpack');
// define preprocessor variables
const ifDefOpts = {
"ifdef-verbose": false, // add this for verbose output
"ifdef-triple-slash": false // add this to use double slash comment instead of default triple slash
};
module.exports = {
entry: {
main: './src/index.ts'
},
module: {
rules: [
{
test: /\.tsx?$/,
use: [
{ loader: 'ts-loader'},
{ loader: "ifdef-loader", options: { TRACING: false } }
],
exclude: /node_modules/
}
]
},
plugins: [
new webpack.DefinePlugin({
VERSION: JSON.stringify(require("./package.json").version)
})
],
resolve: {
extensions: [ '.tsx', '.ts', '.js' ],
modules: [path.resolve(__dirname, "src"), "node_modules"]
}
};