Skip to content

bug: typescript imports using windows paths #4543

@mrginglymus

Description

@mrginglymus

Prerequisites

Stencil Version

4.0.1

Current Behavior

On Windows, the dist-custom-elements target generates a dist/components/index.d.ts with some unescaped windows paths:

/* stencil custom elements */
export { Icon as VIcon } from '..\types\components\icons\icon';
export { defineCustomElement as defineCustomElementVIcon } from './v-icon';

Expected Behavior

/* stencil custom elements */
export { Icon as VIcon } from '../types/components/icons/icon';
export { defineCustomElement as defineCustomElementVIcon } from './v-icon';

System Info

System: node 16.20.0
    Platform: windows (10.0.19045)
   CPU Model: Intel(R) Xeon(R) Gold 5220 CPU @ 2.20GHz (8 cpus)
    Compiler: ...\playground\node_modules\.store\@stencil-core-npm-4.0.1-81248f31a7\node_modules\@stencil\core\compiler\stencil.js
       Build: 1687953951
     Stencil: 4.0.1
  TypeScript: 5.0.4
      Rollup: 2.42.3
      Parse5: 7.1.2
      Sizzle: 2.42.3
      Terser: 5.18.1

Steps to Reproduce

On Windows, the dist-custom-elements target generates a dist/components/index.d.ts with some unescaped windows paths

Code Reproduction URL

n/a

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ValidatedThis PR or Issue is verified to be a bug within Stencil

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions