You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.
if i try to build my project for production and use Uglify for this i get the error
Module build failed: ReferenceError: [BABEL] node_modules/preact-compat/node_modules/proptypes/index.js: Using removed Babel 5 option: node_modules/preact-compat/node_modules/proptypes/.babelrc.loose - Specify the loose option for the relevant plugin you are using or use a preset that sets the option.
It's not the same like #155 - because for the production build, i need to transpile the preact-compat project otherwise its not buildable.
Vanilla JavaScript in a context where ES Modules is present would be ES2015, and that's what index.js is. The issue you ran into is actually just because the proptypes package uses Babel 5, and your babel-loader configuration is recursively looking for .babelrc files. It finds the one in node_modules/proptypes but can't use it because the options are for Babel 5. That said, it's silly for proptypes to include the .babelrc, it was a mistake and I've removed it. The fix is published as [email protected].
TL;DR: Just run npm update and all should be well :)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
if i try to build my project for production and use Uglify for this i get the error
Module build failed: ReferenceError: [BABEL] node_modules/preact-compat/node_modules/proptypes/index.js: Using removed Babel 5 option: node_modules/preact-compat/node_modules/proptypes/.babelrc.loose - Specify the
looseoption for the relevant plugin you are using or use a preset that sets the option.
It's not the same like #155 - because for the production build, i need to transpile the preact-compat project otherwise its not buildable.
My loader is:
the easiest solution will be a vanilla javascript src/index.js file in that plugin so that there is no need for a transformation to js.
Thanks
Marcel
The text was updated successfully, but these errors were encountered: