Update Shakapaker to v7

This commit is contained in:
Sebastian Serth
2023-06-26 08:36:38 +02:00
parent ea60626b87
commit 00026df150
10 changed files with 47 additions and 56 deletions

View File

@ -22,7 +22,7 @@ default: &default
cache_path: tmp/webpacker
webpack_compile_output: true
# See https://github.com/shakacode/shakapacker#deployment
webpacker_precompile: true
shakapacker_precompile: true
# Location for manifest.json, defaults to {public_output_path}/manifest.json if unset
# manifest_path: public/packs/manifest.json

View File

@ -1,6 +1,7 @@
// See the shakacode/shakapacker README and docs directory for advice on customizing your webpackConfig.
const { webpackConfig, config, merge } = require('shakapacker')
const { globalMutableWebpackConfig, generateWebpackConfig, config, merge } = require('shakapacker')
const webpackConfig = generateWebpackConfig()
const webpack = require('webpack');
const CompressionPlugin = require("compression-webpack-plugin");
@ -69,6 +70,6 @@ const envConfig = module.exports = {
// Use the two lines below to remove the original WebpackAssetsManifest and replace it with our custom config.
const filteredPlugins = webpackConfig.plugins.filter((plugin) => !(plugin instanceof WebpackAssetsManifest))
webpackConfig.plugins = filteredPlugins;
globalMutableWebpackConfig.plugins = filteredPlugins;
module.exports = merge(webpackConfig, envConfig)
module.exports = merge(globalMutableWebpackConfig, envConfig)