Upgrade to Webpacker 6.0.
This commit is contained in:
25
config/webpack/base.js
Normal file
25
config/webpack/base.js
Normal 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"
|
||||
}
|
||||
}]
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user