2024-05-07 11:59:46 +03:00
|
|
|
import path from 'path'
|
2024-05-08 19:55:36 +03:00
|
|
|
import webpack from 'webpack'
|
2024-05-07 11:59:46 +03:00
|
|
|
|
|
|
|
export default [
|
|
|
|
{
|
|
|
|
mode: 'production',
|
|
|
|
entry: './assets/events.worker.js',
|
|
|
|
output: {
|
|
|
|
path: path.resolve('static'),
|
|
|
|
filename: 'events.worker.js',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
mode: 'production',
|
|
|
|
entry: './assets/nullifier.worker.js',
|
|
|
|
output: {
|
|
|
|
path: path.resolve('static'),
|
|
|
|
filename: 'nullifier.worker.js',
|
|
|
|
}
|
2024-05-08 19:55:36 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
mode: 'production',
|
|
|
|
entry: './assets/syncEvents.js',
|
|
|
|
output: {
|
|
|
|
path: path.resolve('.'),
|
|
|
|
filename: 'syncEvents.cjs',
|
|
|
|
},
|
|
|
|
target: 'node',
|
|
|
|
plugins: [
|
|
|
|
new webpack.BannerPlugin({
|
|
|
|
banner: '#!/usr/bin/env node\n',
|
|
|
|
raw: true
|
|
|
|
})
|
|
|
|
],
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.mjs$/,
|
|
|
|
include: /node_modules/,
|
|
|
|
type: 'javascript/auto'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'fflate': 'fflate/esm'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
optimization: {
|
|
|
|
minimize: false,
|
|
|
|
}
|
2024-05-07 11:59:46 +03:00
|
|
|
}
|
|
|
|
]
|