Skip to content
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

[enhancement: #14] Compatibility with Vite import.meta #24

Closed
wants to merge 1 commit into from

Conversation

rossyman
Copy link
Owner

@rossyman rossyman commented Sep 9, 2021

Add compatibility with Vite import.meta. There's a wider discussion ongoing about how to use runtime modules outside of the context of a built svelte application. I outlined the current solutions here: #14 (comment) and I'll continue to track sveltejs/kit#1485

Resolves #14

Changelog

@rossyman rossyman added the enhancement New feature or request label Sep 9, 2021
@rossyman rossyman requested a review from braebo September 9, 2021 19:46
@rossyman rossyman self-assigned this Sep 9, 2021
@rossyman
Copy link
Owner Author

Going to re-purpose the PR to update examples based on #23 (comment)

@@ -5,7 +5,10 @@
},
"moduleNameMapper": {
"^\\$lib(.*)$": "<rootDir>/src/lib$1",
"^\\$app(.*)$": ["<rootDir>/.svelte-kit/dev/runtime/app$1", "<rootDir>/.svelte-kit/build/runtime/app$1"]
"^\\$app(.*)$": [
"<rootDir>/.svelte-kit/dev/runtime/app$1",
Copy link

@LeoUrzua LeoUrzua May 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build folder was generated after npm run build and I am not sure how to generate the dev one but this is my folder content

image

I updated these lines to just "<rootDir>/.svelte-kit/runtime/app$1" and it was working for me, let me know what you think @rossyman

@rossyman rossyman closed this Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compatibility with import.meta
2 participants