Skip to content

Cannot load .ts file in the package template output #783

@hyunbinseo

Description

@hyunbinseo

Using the default TypeScript package template:

  1. Create a Component.svelte file and re-export it
  2. In the component, import a module from filename.ts
  3. The following import is kept as-is in the output (./dist)
import { module } from "./utilities.ts";
D:\_\DIST
    Component.svelte
    Component.svelte.d.ts
    index.d.ts
    index.js # index.ts does not exist
    utilities.d.ts
    utilities.js
  1. The following import fails:
import Component from "../../dist/Component.svelte";

Failed to load url ./utilities.ts (resolved id: ./utilities.ts) in D:/_/dist/Component.svelte. Does the file exist?


The tsconfig.json was updated in #757

"allowImportingTsExtensions": true,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions