Files
danbooru/config/webpack/base.js
evazion 0563ca3001 docs: document config/ and some directories in app/.
* 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/.
2021-06-27 05:21:38 -05:00

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]'
}
}]
},
});