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
I am very green with regard to Typescript (as I have only started converting our Javascript codebase), but have been "bitten" by the same problem described in Issue 41513.
I initially posted a similar question on StackOverflow, and found my own (not-very-elegant) solution.
What I (and apparently others) would really like to see is a compiler switch such as:
tsc --noGeneratedExports
Regardless of the compiler option / switch name, the effect would be that tsc would NOT emit statements such as the following (which appear at the top of a Javascript file):
... or the following, which appear at the end of a Javascript file:
export {};
In both cases above, when trying to load the resulting Javascript LOCALLY (from the file system) -- the browser will throw an exception.
Having a compiler option that outputs Javascript that can be loaded into a browser locally would eliminate the need for a module bundler and/or local web server.
Thanks in advance for your consideration.
The text was updated successfully, but these errors were encountered:
I am very green with regard to Typescript (as I have only started converting our Javascript codebase), but have been "bitten" by the same problem described in Issue 41513.
I initially posted a similar question on StackOverflow, and found my own (not-very-elegant) solution.
What I (and apparently others) would really like to see is a compiler switch such as:
tsc --noGeneratedExports
Regardless of the compiler option / switch name, the effect would be that tsc would NOT emit statements such as the following (which appear at the top of a Javascript file):
Object.defineProperty(exports, "__esModule", { value: true });
... or the following, which appear at the end of a Javascript file:
export {};
In both cases above, when trying to load the resulting Javascript LOCALLY (from the file system) -- the browser will throw an exception.
Having a compiler option that outputs Javascript that can be loaded into a browser locally would eliminate the need for a module bundler and/or local web server.
Thanks in advance for your consideration.
The text was updated successfully, but these errors were encountered: