forked from vgoma/crypto-pro
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
executable file
·32 lines (31 loc) · 845 Bytes
/
webpack.config.js
File metadata and controls
executable file
·32 lines (31 loc) · 845 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
const path = require('path');
const packageJson = require('./package.json');
const tsConfig = require(`./${process.env.TS_CONFIG}`);
module.exports = {
context: path.resolve(__dirname, 'src'),
entry: `./${packageJson.name}.ts`,
module: {
rules: [{
test: /\.ts$/,
use: [{
loader: 'ts-loader',
options: {
configFile: process.env.TS_CONFIG
},
}],
exclude: /node_modules/
}]
},
resolve: {
extensions: ['.ts', '.js']
},
output: {
path: path.resolve(__dirname, tsConfig.compilerOptions.outDir),
filename: process.env.NODE_ENV === 'production' ? `${packageJson.name}.min.js` : `${packageJson.name}.js`,
libraryTarget: 'umd',
library: 'cryptoPro',
umdNamedDefine: true
},
mode: process.env.NODE_ENV || 'development',
devtool: 'source-map'
};