Update webpack config to match newest webpacker gem

This commit is contained in:
Sebastian Serth
2020-12-01 17:58:33 +01:00
parent d58b49f71f
commit f201804486
12 changed files with 142 additions and 142 deletions

View File

@ -4,9 +4,9 @@ Info for this file can be found
github.com/rails/webpacker/blob/master/docs/webpack.md
*/
const { environment } = require('@rails/webpacker');
const { merge } = require('webpack-merge');
const webpack = require('webpack');
const { environment } = require('@rails/webpacker')
const { merge } = require('webpack-merge')
const webpack = require('webpack')
// Add an additional plugin of your choosing : ProvidePlugin
environment.plugins.prepend('Provide', new webpack.ProvidePlugin({
@ -22,15 +22,15 @@ environment.plugins.prepend('Provide', new webpack.ProvidePlugin({
Sentry: '@sentry/browser',
Sortable: 'sortablejs',
})
);
)
const envConfig = module.exports = environment;
const envConfig = module.exports = environment
const aliasConfig = module.exports = {
resolve: {
alias: {
jquery: 'jquery/src/jquery',
}
}
};
}
module.exports = merge(envConfig.toWebpackConfig(), aliasConfig);
module.exports = merge(envConfig.toWebpackConfig(), aliasConfig)