Files
danbooru/config/webpack/base.js
evazion d441739ab2 Fix #4802: Ruffle conflicts with danbooru JS
Caused by Webpack clobbering the `Danbooru` variable for unknown reasons
when the app/javascript/packs/flash.js pack is loaded. Disabling the
output.library option seems to fix it.
2021-09-03 03:50:52 -05:00

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