Files
javascript-obfuscator-javas…/webpack/webpack.browser.config.js
T
sanex 381fd18177 * @gradecam/tsenum replaced with an internal implementation
* Optimized performance of `ExpressionStatementsMergeTransformer` when `simplify` option is enabled
2020-10-11 14:06:50 +03:00

54 lines
1.1 KiB
JavaScript

'use strict';
const webpack = require('webpack');
const packageJson = require('pjson');
const WebpackUtils = require('./utils/WebpackUtils').WebpackUtils;
module.exports = {
devtool: 'source-map',
entry: {
'index': './index.ts'
},
target: 'web',
module: {
exprContextCritical: false,
rules: [
{
test: /\.ts$/,
loader: 'ts-loader'
}
]
},
resolve: {
alias: {
assert: 'assert'
},
extensions: ['.ts', '.js']
},
plugins: [
new webpack.BannerPlugin(
{
banner: WebpackUtils.getBannerText(WebpackUtils.getLicenseText()),
raw: true,
entryOnly: false
}
),
new webpack.EnvironmentPlugin({
VERSION: packageJson.version
})
],
output: {
libraryTarget: 'umd',
library: 'JavaScriptObfuscator',
filename: 'index.browser.js'
},
performance: {
hints: false
},
stats: {
excludeModules: true,
warnings: false
}
};