Conversation
|
First one is a file concatenation. It is enabled when module is anything except system or amd. What it's doing is simply joining all files, without any wrappers or something like that. Because of that everything declared in files is available in all other files (what @tomblind said in a comment above). However, it doesn't allow imports and exports in all files in the project. The second mode is bundling. It's enabled when module is Currently this PR mixes both of these ways, which won't work in a lot of cases I can think of.
I don't think we should change any options implicitly, because if it's not specified in config it won't work with language service anyway. |
|
Sorry, closed it accidentally |
|
Any progress on that? I would like to use it for single output file |
|
I'll look into this some more today |
|
I'm leaving source map tracebacks for bundles out of scope for this PR as I'm not too sure how to proceed with it and this PR is pretty old but does allow --outFile support. I've added --luaModuleSystem ( |
ark120202
left a comment
There was a problem hiding this comment.
I think we should have a diagnostic when luaEntry is specified without outFile, but I'm fine if we'll leave it to other PR, since we are missing a lot of other option checks anyway.
Co-Authored-By: ark120202 <ark120202@gmail.com>
Co-Authored-By: ark120202 <ark120202@gmail.com>
|
Bundling implemented by #750 instead. |
Closes #357
Tried out supporting the
--outFileoption and seemed to make some good progress.tstlpackage.preloadrequireandpackageto exist in the target Lua environmentThe new option
luaEntrycan be used to specify what file will be executed when running the outFile. The exports of that TypeScript file are what the outFile as a whole will return.Any other high or low level considerations regarding a single output file would be appreciated on this PR.