mirror of
https://github.com/Darkatse/TauriTavern.git
synced 2026-10-14 02:21:24 +00:00
51 lines
1.1 KiB
JavaScript
51 lines
1.1 KiB
JavaScript
import path from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
// Get the directory name of the current module
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
export default {
|
|
mode: 'production',
|
|
target: ['web', 'es2020'],
|
|
cache: {
|
|
type: 'filesystem',
|
|
cacheDirectory: path.resolve(__dirname, '.cache/webpack'),
|
|
},
|
|
entry: {
|
|
'lib.core': './src/lib-bundle-core.js',
|
|
'lib.optional': './src/lib-bundle-optional.js',
|
|
},
|
|
output: {
|
|
filename: '[name].bundle.js',
|
|
path: path.resolve(__dirname, 'src/dist'),
|
|
library: {
|
|
type: 'module'
|
|
}
|
|
},
|
|
experiments: {
|
|
outputModule: true,
|
|
},
|
|
resolve: {
|
|
extensions: ['.js'],
|
|
fallback: {
|
|
"path": false,
|
|
"fs": false,
|
|
"crypto": false,
|
|
"stream": false,
|
|
"buffer": false,
|
|
"util": false,
|
|
"assert": false,
|
|
"os": false
|
|
}
|
|
},
|
|
optimization: {
|
|
moduleIds: 'deterministic',
|
|
chunkIds: 'deterministic',
|
|
},
|
|
performance: {
|
|
hints: false,
|
|
maxEntrypointSize: 5120000,
|
|
maxAssetSize: 5120000
|
|
},
|
|
};
|