Skip to content

Commit

Permalink
Merge pull request #195 from ryoppippi/feature/fix-sveltee
Browse files Browse the repository at this point in the history
refactor(core/svelte): dependency resolution
  • Loading branch information
ryoppippi authored Jul 13, 2024
2 parents cce9692 + 51fef1c commit e479d96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/unplugin-typia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
"rollup": {
"optional": true
},
"svelte": {
"optional": true
},
"vite": {
"optional": true
},
Expand Down
2 changes: 1 addition & 1 deletion packages/unplugin-typia/src/core/languages/svelte.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { preprocess as sveltePreprocess } from 'svelte/compiler';
import type { Data, ID, Source } from '../types.js';
import { wrap } from '../types.js';

Expand All @@ -24,6 +23,7 @@ export async function preprocess(
{ source, id, transform }:
{ source: Source; id: ID; transform: TransformFunction },
): Promise<{ code: Data }> {
const { preprocess: sveltePreprocess } = await import('svelte/compiler');
const { code } = await sveltePreprocess(source, {
script: async ({ content, filename, attributes }) => {
if (filename == null) {
Expand Down

0 comments on commit e479d96

Please sign in to comment.