forked from little-gg-bound/bsc-swap-autotrade-bot-v1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
backpack.config.js
26 lines (26 loc) · 854 Bytes
/
backpack.config.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
const path = require('path');
module.exports = {
webpack: (config, options, webpack) => {
config.entry.main = [
path.join(__dirname, './src/index.ts'),
];
// config.devtool = process.env.NODE_ENV === 'development';
config.mode = process.env.NODE_ENV === 'development' ? 'development' : 'production';
config.resolve = {
extensions: [".ts", ".js", ".json"]
};
config.module.rules.push({
test: /\.ts$/,
loader: 'awesome-typescript-loader',
options: {
sourceMap: true,
productionSourceMap: false,
}
});
if (process.env.NODE_ENV === 'production') {
//config.productionSourceMap = false;
config.plugins.slice(1, 1);
}
return config
}
};