SillyTavern/webpack.config.js
2024-11-29 00:13:43 +02:00

36 lines
801 B
JavaScript

import process from 'node:process';
import path from 'node:path';
/** @type {import('webpack').Configuration} */
export const publicLibConfig = {
mode: 'production',
entry: './public/lib.js',
cache: {
type: 'filesystem',
cacheDirectory: path.resolve(process.cwd(), 'dist/webpack'),
store: 'pack',
compression: 'gzip',
},
devtool: false,
watch: false,
module: {},
stats: {
preset: 'minimal',
assets: false,
modules: false,
colors: true,
timings: true,
},
experiments: {
outputModule: true,
},
performance: {
hints: false,
},
output: {
path: path.resolve(process.cwd(), 'dist'),
filename: 'lib.js',
libraryTarget: 'module',
},
};