-
Notifications
You must be signed in to change notification settings - Fork 201
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
transformModulesToAmd + unbundled option fails to resolve bare imports #3402
Comments
here's my polymer.json https://github.com/elmsln/HAXcms/blob/master/polymer.json#L47 which is leveraged to kick things over to that CDN. |
TLDR;
This is an issue with unbundled AMD module compiling.
This repo's output will WORK for the one marked unbroken and will break for the one marked broken. The only difference is the bundling. What's breaking appears to be a combination of transformModulesToAmd when using the unbundled flag. Dynamic imports Unbundled works fine without the AMD transform. AMD works fine without dynamic imports. |
thanks to @Westbrook for making the repo to confirm I wasn't crazy |
[polymer-build] #3402 resolveBareSpecifiers must be a Program
Just published [email protected] and [email protected] which incorporate your PR. Please install and verify fix for your use case. Reopen this issue if you have continued trouble. :) |
installed to double check and yes this appears to have fixed it. Thank you for accepting so quickly! |
the transformModulesToAmd option in build routinse in Polymer build does not correctly resolve bare dynamic imports. This is visible in firefox where it will convert it to a require statement but not actually alter the path, causing it to try and be relative to where ever the current file is.
TypeError: "Failed to fetch https://cdn.waxam.io/build/es5-amd/node_modules/@lrnwebcomponents/haxcms-elements/lib/core/@lrnwebcomponents/haxcms-elements/lib/core/haxcms-editor-builder.js"
in this example:
https://cdn.waxam.io/build/es5-amd/node_modules/@lrnwebcomponents/haxcms-elements/lib/core/haxcms-site-builder.js
will callimport("@lrnwebcomponents/haxcms-elements/lib/core/haxcms-editor-builder.js")
. This works fine in ES6 but when it goes to path resolve in ES5 you get what you see above as opposed to any kind of../../../../
being appended to make the path relative accuratelyThe text was updated successfully, but these errors were encountered: