-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add .js extension to virtual tslib #170
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks, in 0.24.1 now |
This was referenced Sep 18, 2019
1 task
This was referenced Jun 6, 2021
Open
Open
NSeydoux
added a commit
to inrupt/solid-client-vc-js
that referenced
this pull request
Sep 9, 2021
This prevents the bahaviour documented in ezolenko/rollup-plugin-typescript2#170 from happening. Namely, a _virtual/tslib.js file would be emitted, which confuses NodeJS because we expect all ES modules to have the .mjs extension. The previous syntax feels more elegant though, so I think it should be re-enabled once the bug is resolved. Also, there's no guarantee that this issue can alway be worked around so easily.
NSeydoux
added a commit
to inrupt/solid-client-vc-js
that referenced
this pull request
Sep 9, 2021
This prevents the bahaviour documented in ezolenko/rollup-plugin-typescript2#170 from happening. Namely, a _virtual/tslib.js file would be emitted, which confuses NodeJS because we expect all ES modules to have the .mjs extension. The previous syntax feels more elegant though, so I think it should be re-enabled once the bug is resolved. Also, there's no guarantee that this issue can alway be worked around so easily. Issue tracking is available at ezolenko/rollup-plugin-typescript2#282.
NSeydoux
added a commit
to inrupt/solid-client-vc-js
that referenced
this pull request
Sep 15, 2021
This re-enables package import tests. They had been disabled until the package was published on NPM, and mistakingly hadn't been re-enabled. * Fix umd module name to avoid conflicts * Work around rollup ts plugin ES issue: This prevents the bahaviour documented in ezolenko/rollup-plugin-typescript2#170 from happening. Namely, a _virtual/tslib.js file would be emitted, which confuses NodeJS because we expect all ES modules to have the .mjs extension. The previous syntax feels more elegant though, so I think it should be re-enabled once the bug is resolved. Also, there's no guarantee that this issue can alway be worked around so easily. Issue tracking is available at ezolenko/rollup-plugin-typescript2#282. * Disable defaulting to solid-client-authn-browser: Trying to import the package in an environment where it's not available causes Webpack to fail. Until a proper fix is found, this works around the issue by simply not trying to auto-import the @inrupt/solid-client-authn package.
@mnlbox please see #240 (comment) for an answer to that question. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rollup has
preserveModules
option which is used to skip flat bundling and writing instead to disk a directory structure resembling the input one. This plugin makes tslib a "virtual" module by default - this means that it virtually creates an input file for Rollup to consume, but obviously it's not part of the input directory structure. To deal with it in combination withpreserveModules
Rollup creates a_virtual
output directory and put such modules in it. As filename of such a virtual module it uses "as is" the given identifier - in this case\0tslib
. Problem is that it doesn't add any extension to it and this trips other tools if you don't include the extension in the virtual identifier - i.e. webpack and it's resolving algorithm.