mirror of
https://github.com/crypto-pro-web/crypto-pro-js.git
synced 2024-11-24 00:55:00 +03:00
33 lines
845 B
JavaScript
Executable File
33 lines
845 B
JavaScript
Executable File
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'
|
|
};
|