Skip to content

Commit

Permalink
remove cjs import
Browse files Browse the repository at this point in the history
  • Loading branch information
byara committed Nov 22, 2024
1 parent d7bdc8c commit 4db1305
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/preprocessors/svelte-preprocessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { preprocessor } from './preprocessor';
const booleanGuard = <T>(value: T | undefined): value is T => Boolean(value);

const sortImports = (code: string, options: PrettierOptions) => {
const { parse } = require('svelte/compiler.cjs');
const { parse } = require('svelte/compiler');
const { instance, module } = parse(code);
const sources = [instance, module].filter(booleanGuard);
if (!sources.length) return code;
Expand Down

0 comments on commit 4db1305

Please sign in to comment.