Upgrade to Webpacker 6.0.

This commit is contained in:
evazion
2021-01-27 20:49:24 -06:00
parent 2eeee446a5
commit 90cd3293eb
20 changed files with 717 additions and 3088 deletions

25
config/webpack/base.js Normal file
View File

@@ -0,0 +1,25 @@
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: [{
test: /.erb$/,
enforce: "pre",
exclude: /node_modules/,
loader: "rails-erb-loader",
options: {
runner: "bin/rails runner"
}
}]
},
});