-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bin/webpack -p fails to process jest snapshot files #746
Comments
Strangely,
|
I'm not sure what's causing the error, but Webpacker already configures production builds so there's no need for the webpacker/package/environments/production.js Lines 9 to 25 in fb8dd8c
|
Yep we do and hence the error - it's trying to uglify twice. For ignore loader, you can just setup with extension: module.exports = {
test: /\.snap$/,
loader: 'ignore-loader'
} |
Gotcha, thank you! |
bin/webpack
works fine, butNODE_ENV=production RAILS_ENV=production bin/webpack -p
fails:The offending file:
./app/javascript/apps/account/components/__snapshots__/AccountPage.test.js.snap
:A few things are weird about this:
uglifyjs-webpack-plugin
uses "uglify-es" which should be able to process ES6 files.uglifyjs-webpack-plugin@^0.4.6
tests against/.js($|?)/i
files, which should not matchAccountPage.test.js.snap
-- why is UglifyJs processing this file?ignore-loader
with the following config -- again, why is UglifyJs processing the snapshot file?The text was updated successfully, but these errors were encountered: