mirror of
https://github.com/alexgo-io/stacks.js.git
synced 2026-06-16 05:26:37 +08:00
42 lines
793 B
JavaScript
42 lines
793 B
JavaScript
const path = require('path');
|
|
const webpack = require('webpack');
|
|
module.exports = {
|
|
mode: 'production',
|
|
entry: "./src/index.ts",
|
|
output: {
|
|
library: 'StacksAuth',
|
|
libraryTarget: 'umd',
|
|
filename: 'index.umd.js',
|
|
path: path.resolve(__dirname, 'dist')
|
|
},
|
|
resolve: {
|
|
extensions: ['.ts', '.js'],
|
|
fallback: {
|
|
'crypto': false,
|
|
'events': false,
|
|
'stream': false,
|
|
},
|
|
},
|
|
plugins: [
|
|
new webpack.ProvidePlugin({
|
|
Buffer: ['buffer', 'Buffer'],
|
|
})
|
|
],
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: [
|
|
{
|
|
loader: 'ts-loader',
|
|
options: {
|
|
transpileOnly: true,
|
|
configFile: 'tsconfig.build.json',
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
};
|