* Add README files to several directories in app/ giving a brief overview of some parts of Danbooru's architecture. * Add documentation for files in config/.
33 lines
681 B
JavaScript
33 lines
681 B
JavaScript
const { webpackConfig, merge } = require('@rails/webpacker')
|
|
|
|
module.exports = merge(webpackConfig, {
|
|
output: {
|
|
library: "Danbooru",
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"jquery": "jquery/src/jquery.js",
|
|
"react": "preact/compat",
|
|
"react-dom": "preact/compat",
|
|
}
|
|
},
|
|
module: {
|
|
rules: [{
|
|
// https://github.com/usabilityhub/rails-erb-loader
|
|
test: /.erb$/,
|
|
enforce: "pre",
|
|
exclude: /node_modules/,
|
|
loader: "rails-erb-loader",
|
|
options: {
|
|
runner: "bin/rails runner"
|
|
}
|
|
}, {
|
|
test: /\.wasm$/,
|
|
type: 'asset/resource',
|
|
generator: {
|
|
filename: 'js/[name][ext]'
|
|
}
|
|
}]
|
|
},
|
|
});
|