[JS] Fix images not loading in older browsers

The vue 3 bundle isn't transpiled down as much as we need it to,
this will run it through our transpile step
This commit is contained in:
Earlopain 2022-06-01 21:37:07 +02:00
parent 3b45322fd9
commit 1c51a35484
No known key found for this signature in database
GPG Key ID: 6CFB948E15246897

View File

@ -1,4 +1,5 @@
const { webpackConfig, merge } = require('@rails/webpacker')
const babelConfig = require('@rails/webpacker/package/rules/babel')
const vueConfig = require('./loaders/vue')
const customConfig = {
@ -25,4 +26,8 @@ const customConfig = {
target: ['web', 'es5']
}
// Force babel-loader to transpile vue
babelConfig.exclude = /node_modules\/(?!(@vue|vue-loader)\/).*/;
babelConfig.include.push(/node_modules\/(@vue|vue-loader)\//);
module.exports = merge(vueConfig, webpackConfig, customConfig)