Skip to content

New module resolution and Compilation structure #432

@ark120202

Description

@ark120202

Continuation of #270.

  • Remove everything related to module resolving from Transformer
  • Add a new class - Compilation, that would accept all files compiled with transformer, process all of them with a regular expression, find require calls and resolve them.
    • All resolved .lua files would be loaded as well
    • Require class would be replaced with real resolved paths.
    • Since all .lua files would get loaded, that would be a step towards resolving Single file target #357
  • Add a new option that would control how Compilation. If it's in lib mode it won't transform require paths (except for resolution of "paths" tsconfig options). If it's in app mode it would output dependencies to node_modules directory of build target. That would also allow to reuse npm resolution technique to avoid version conflicts.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions