Skip to content

Commit 30204ee

Browse files
committed
fix(types): normalize stencil.core import path
1 parent 570d741 commit 30204ee

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/compiler/types/stencil-types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as d from '../../declarations';
22
import { isOutputTargetDist } from '../output-targets/output-utils';
3+
import { normalizePath } from '@utils';
34

45

56
export function updateStencilTypesImports(path: d.Path, typesDir: string, dtsFilePath: string, dtsContent: string) {
@@ -11,6 +12,7 @@ export function updateStencilTypesImports(path: d.Path, typesDir: string, dtsFil
1112
coreDtsPath = `./${coreDtsPath}`;
1213
}
1314

15+
coreDtsPath = normalizePath(coreDtsPath);
1416
if (dtsContent.includes('@stencil/core')) {
1517
dtsContent = dtsContent.replace(/(from\s*(:?'|"))@stencil\/core\/internal('|")/g, `$1${coreDtsPath}$2`);
1618
dtsContent = dtsContent.replace(/(from\s*(:?'|"))@stencil\/core('|")/g, `$1${coreDtsPath}$2`);

0 commit comments

Comments
 (0)