rails_api_base
rails_api_base copied to clipboard
Fix webpack compilation error when pushing to heroku
trafficstars
Board:
N/A
Description:
Pushing to Heroku was throwing errors related to webpack. Updating webpacker package version fixes the problem. Heroku logs before:
Compilation failed:
Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema.
- options has an unknown property 'cache'. These properties are valid:
object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename? }
ValidationError: Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema.
at validate (/tmp/build_00139f41/node_modules/compression-webpack-plugin/node_modules/schema-utils/dist/validate.js:104:11)
at new CompressionPlugin (/tmp/build_00139f41/node_modules/compression-webpack-plugin/dist/index.js:26:31)
at new module.exports (/tmp/build_00139f41/node_modules/@rails/webpacker/package/environments/production.js:13:7)
at createEnvironment (/tmp/build_00139f41/node_modules/@rails/webpacker/package/index.js:15:10)
at Object.<anonymous> (/tmp/build_00139f41/node_modules/@rails/webpacker/package/index.js:21:16)
at Module._compile (/tmp/build_00139f41/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
....
@diego-suarez would you mind rebasing and merging? Thanks 🙌
Just in case you want to move fordward with this fix, I have rebased this branch with master in my forked repo