2024-10-17 00:16:56 +02:00
|
|
|
import process from 'node:process';
|
|
|
|
import path from 'node:path';
|
|
|
|
|
2024-10-16 21:00:14 +02:00
|
|
|
/** @type {import('webpack').Configuration} */
|
|
|
|
export const publicLibConfig = {
|
|
|
|
mode: 'production',
|
|
|
|
entry: './public/lib.js',
|
2024-10-17 00:16:56 +02:00
|
|
|
cache: {
|
|
|
|
type: 'filesystem',
|
|
|
|
cacheDirectory: path.resolve(process.cwd(), 'dist/webpack'),
|
|
|
|
},
|
2024-10-16 23:52:49 +02:00
|
|
|
devtool: false,
|
2024-10-17 19:59:42 +02:00
|
|
|
watch: false,
|
2024-10-16 22:11:13 +02:00
|
|
|
module: {},
|
2024-10-16 23:52:49 +02:00
|
|
|
stats: {
|
|
|
|
preset: 'minimal',
|
|
|
|
assets: false,
|
|
|
|
modules: false,
|
|
|
|
},
|
2024-10-16 21:00:14 +02:00
|
|
|
experiments: {
|
|
|
|
outputModule: true,
|
|
|
|
},
|
2024-10-16 23:49:06 +02:00
|
|
|
performance: {
|
|
|
|
hints: false,
|
|
|
|
},
|
2024-10-16 21:00:14 +02:00
|
|
|
output: {
|
|
|
|
filename: 'lib.js',
|
|
|
|
libraryTarget: 'module',
|
|
|
|
},
|
|
|
|
};
|