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

chore: fix test run when linking vite #773

Merged
merged 1 commit into from
Oct 23, 2023
Merged

chore: fix test run when linking vite #773

merged 1 commit into from
Oct 23, 2023

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Oct 23, 2023

  • Install sass in packages/vite-plugin-svelte so the vitePreprocess unit test is able to import sass
  • Add inlineConfig in vitePreprocess unit test so it has a proper root to resolve sass
  • Refactor dynamic import hack to normal import
 FAIL  packages/e2e-tests/import-queries/__tests__/import-queries.spec.ts > ssrLoadModule
TypeError: A dynamic import callback was not specified.
 ❯ eval packages/vite-plugin-svelte/src/utils/load-svelte-config.js:22:30
     20| // see https://github.com/microsoft/TypeScript/issues/43329#issuecomment-811606238
     21| // also use timestamp query to avoid caching on reload
     22| const dynamicImportDefault = new Function(
       |                              ^
     23|  'path',
     24|  'timestamp',
 ❯ Module.loadSvelteConfig packages/vite-plugin-svelte/src/utils/load-svelte-config.js:39:26
 ❯ Module.preResolveOptions packages/vite-plugin-svelte/src/utils/options.js:146:9
 ❯ config packages/vite-plugin-svelte/src/index.js:57:21
 ❯ runConfigHook ../vite/packages/vite/src/node/packages.ts:17905:31
 ❯ resolveConfig ../vite/packages/vite/src/node/packages.ts:17353:20
 ❯ _createServer ../vite/packages/vite/src/node/packages.ts:16592:20
 ❯ packages/e2e-tests/import-queries/__tests__/import-queries.spec.ts:135:10

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING' }
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

But anyways it's good that we can remove the hack today as we don't use TS.

@bluwy bluwy merged commit efd571f into main Oct 23, 2023
@bluwy bluwy deleted the vite-link-test branch October 23, 2023 09:35
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.

2 participants