8000 fix: import types from types.ts instead of types.js to fix deno vendor errors by jespertheend · Pull Request #755 · rendajs/renda · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: import types from types.ts instead of types.js to fix deno vendor errors #755

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

Merged
merged 1 commit into from
Aug 5, 2023

Conversation

jespertheend
Copy link
Collaborator

When trying to vendor Renda files from a url like raw.githubusercontent.com or deno.land/x, it will fail due to deno parsing the entire module tree, including type imports.
It fails because of css import assertions, and because of some import paths that were using .js instead of .ts.
Unfortunately, there's not much we can do about css import assertions. Whoever tries to vendor it will have to add studioStyles.js and shadowStyles.js to their import map and point it to an empty file.
But the .js file extensions we can fix, since TS supports .ts imports now.

9F28
@jespertheend
Copy link
Collaborator Author

Ugh, this is a lost cause. There seems to be a lot of urls preventing vendoring.
With tsc helper, I had to add all of these to excludeUrls:

excludeUrls: [
	"https://raw.githubusercontent.com/rendajs/Renda/main/studio/src/styles/projectSelectorStyles.js",
	"https://raw.githubusercontent.com/rendajs/Renda/main/studio/src/styles/studioStyles.js",
	"https://raw.githubusercontent.com/rendajs/Renda/main/studio/src/styles/shadowStyles.js",
	"https://raw.githubusercontent.com/rendajs/Renda/main/studio/deps/rollup-plugin-resolve-url-objects.js",
	"https://raw.githubusercontent.com/rendajs/Renda/main/studio/deps/rollup.browser.js",
	"rollup",
],

Oh well, at least this minor change removes a few from this list I think.

@jespertheend jespertheend merged commit 6344b5c into rendajs:main Aug 5, 2023
@jespertheend jespertheend deleted the fix-vendoring branch August 5, 2023 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0