Skip to content

Commit

Permalink
feat: remove * import for treeshaking
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianrothe committed Jul 23, 2023
1 parent a028920 commit d079756
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/transformer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { execSync } from 'child_process'
import { basename, extname } from 'path'
import { pathToFileURL } from 'url'
import * as svelte from 'svelte/compiler'
import { compile, preprocess as sveltePreprocess } from 'svelte/compiler'

import { getSvelteConfig } from './svelteconfig.js'

Expand Down Expand Up @@ -32,7 +32,7 @@ const processAsync = async (source, filename, jestOptions) => {

const svelteConfigPath = getSvelteConfig(rootMode, filename, preprocess)
const svelteConfig = await dynamicImport(svelteConfigPath)
const processed = await svelte.preprocess(
const processed = await sveltePreprocess(
source,
svelteConfig.default.preprocess || {},
{ filename }
Expand Down Expand Up @@ -96,7 +96,7 @@ const compiler = (format, options = {}, filename, processedCode, processedMap) =

let result
try {
result = svelte.compile(processedCode, opts)
result = compile(processedCode, opts)
} catch (error) {
let msg = error.message
if (error.frame) {
Expand Down

0 comments on commit d079756

Please sign in to comment.