Describe the bug
See the discussion on #1104
The compiled code is split between two folders:
./out for the code compiled to CommonJS modules as well as a compiled copy of the test code
./lib for the code compiled to UMD modules and to ESM modules
Notably, the relative paths to ./l10n from the CommonJS server.js and the UMD and ESM server.js are different. This means that the localization information will not be loaded properly when running with the compiled UMD or ESM code.
Making changes to the output directory structure could break projects that consume yaml-language-server, but the current structure is confusing and causing problems.
Expected Behavior
- There should be one "output" folder for the compiled code
- The relative path from server.js to ./l10n for CJS, UMD, and ESM should be the same
Current Behavior
- There are two output folders:
out and lib
- The relative path from server.js to ./l10n for CJS is
../../../l10n and for UMD and ESM it's ../../l10n
Steps to Reproduce
- Compile the code
npm run compile; npm run compile:esm; npm run compile:umd
- Observe the directory structure of the output code
Environment
Describe the bug
See the discussion on #1104
The compiled code is split between two folders:
./outfor the code compiled to CommonJS modules as well as a compiled copy of the test code./libfor the code compiled to UMD modules and to ESM modulesNotably, the relative paths to ./l10n from the CommonJS server.js and the UMD and ESM server.js are different. This means that the localization information will not be loaded properly when running with the compiled UMD or ESM code.
Making changes to the output directory structure could break projects that consume yaml-language-server, but the current structure is confusing and causing problems.
Expected Behavior
Current Behavior
outandlib../../../l10nand for UMD and ESM it's../../l10nSteps to Reproduce
npm run compile; npm run compile:esm; npm run compile:umdEnvironment