Skip to content

endigma/svelte-esbuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

svelte-esbuild bug reproduce conditions

when typescript({ content }) {} replacement is embedded into the automatic preprocessor, it fails with:

and

when replacement is wrapped in typescript() from svelte-preprocessor, functions normally.

this seems almost nonsensical but it's reproducible.

success

rollup.config.js

// import spp from "svelte-preprocess";
// import { typescript } from "svelte-preprocess"
// ...
preprocess: [
    typescript({
        typescript({ content }) {
            const { code, map } = transformSync(content, {
                loader: "ts",
            });
            return { code, map };
        }
    }),
    spp({
        typescript: false
    }),
],
// ...

fail

rollup.config.js

// import spp from "svelte-preprocess";
// ...
preprocess: [
    spp({
        typescript({ content }) {
            const { code, map } = transformSync(content, {
                loader: "ts",
            });
            return { code, map };
        }
    }),
],
// ...

run

git clone git@gitlab.com:endigma/svelte-esbuild.git
cd svelte-esbuild

yarn install
yarn dev # or yarn build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published