mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add webpack for external frontend libraries.
This commit is contained in:
20
webpack.config.js
Normal file
20
webpack.config.js
Normal file
@ -0,0 +1,20 @@
|
||||
/** @type {import('webpack').Configuration} */
|
||||
export const publicLibConfig = {
|
||||
mode: 'production',
|
||||
entry: './public/lib.js',
|
||||
cache: true,
|
||||
devtool: 'source-map',
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
}],
|
||||
},
|
||||
experiments: {
|
||||
outputModule: true,
|
||||
},
|
||||
output: {
|
||||
filename: 'lib.js',
|
||||
libraryTarget: 'module',
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user