jbase62/webpack.config.js

32 lines
780 B
JavaScript
Raw Permalink Normal View History

2023-04-20 11:14:04 +08:00
const path = require('path');
module.exports = {
mode: 'production',
devtool: 'nosources-source-map',
entry: './src/index.js',
externals: ['lodash'],
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'jbase62.js',
library: "JBase62",
libraryExport: 'default',
libraryTarget: 'umd',
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
}
}
}
]
},
externals: {
'lodash': '_',
}
};