You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// both of these two imports trigger the bug:typeTreeView=import("../jsModule/services.js").TreeView;import("../jsModule/services.js").then((module)=>{const_TreeView=module.TreeView;});
...
jsModule/jsModule.ts
Imported via "./jsModule.js" from file 'jsModule/services.ts'
jsModule/services.ts
Imported via "../jsModule/services.js" from file 'src/main.ts'
Imported via "../jsModule/services.js" from file 'src/main.ts'
src/main.ts
Part of 'files' list in tsconfig.json
π Expected behavior
The emit of commonJs is completely surprising.
Expected would be one of
The files are not included (or referenced) in src/tsconfig.json so they should not be rebuild (but only .d.ts files consumed) or
if this needs to be rebuild it should be correctly based on its tsconfig.json
Additional information about the issue
With my real code these folders are different VS 2022 projects and therefore have no references.
The text was updated successfully, but these errors were encountered:
π Search Terms
module import commonjs barrel
π Version & Regression Information
β― Playground Link
https://github.com/HolgerJeromin/ts-issues/tree/ts-61316
π» Code
Folder
jsModule
with tsconfig and one module file and a barrel file:file
jsModule/jsModule.ts
file
jsModule/services.ts
jsModule/tsconfig.json
And a folder
src
withmodule=none
compile:file
src/main.ts
src/tsconfig.json
π Actual behavior
Build jsModule folder:
Results in correct
jsModule/jsModule.js
Build src folder:
Changes existing
jsModule/jsModule.js
to commonJs output:--explainFiles
shows this:π Expected behavior
The emit of commonJs is completely surprising.
Expected would be one of
src/tsconfig.json
so they should not be rebuild (but only.d.ts
files consumed) ortsconfig.json
Additional information about the issue
With my real code these folders are different VS 2022 projects and therefore have no
references
.The text was updated successfully, but these errors were encountered: