-
-
Notifications
You must be signed in to change notification settings - Fork 199
"Error: Encore.__esModule is not a recognized property or method." after upgrade to 0.15 #166
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
Comments
Hi @lewactwo, Some questions to pinpoint the origin of this issue:
Thanks |
webpack.config.babel.js:
command:
|
I'm a bit confused by the first line of your Do you still have an error if you replace it by |
hmm, I think this is related to the new error-catching proxy added in #150. @Lyrkan when the file is named @weaverryan @Lyrkan I suggest whitelisting the properties accessed by the babel require wrapper ( |
I am using ES6 in webpack.config from year :) If I revert webpack-encore to 0.14 it works as expected. |
@lewactwo yeah, as I said, this is related to a change we made to provide better error reporting. We should be able to fix it in the next version of Encore |
Didn't know that @stof, I'll check it out more in details later but yeah it looks like the following change is enough for a basic use case (no idea if there is something else we should worry about though): const publicApiProxy = new Proxy(publicApi, {
get: (target, prop) => {
if (prop === '__esModule') {
return target[prop];
}
// (...)
}
}); |
…ack.config.babel.js file (symfony#166)
…ack.config.babel.js file (symfony#166)
This PR was merged into the master branch. Discussion ---------- Fix "__esModule is not a recognized property" error This PR removes the "__esModule is not a recognized property" error that is currently displayed after importing Encore using an ES6 import through a `webpack.config.babel.js` file (fixes #166). Commits ------- 78ac47a Fix "__esModule is not a recognized property" error when using a webpack.config.babel.js file (#166)
Fix merged and 0.15.1 tagged. I hope this helps! Thanks for the fix @Lyrkan and @lewactwo for the report! |
I've upgraded @symfony/webpack-encore to 0.15 and now I got this error:
Problematic commit: d592481
The text was updated successfully, but these errors were encountered: