I want to use shared code in our TypeScript project. I basically followed the TypeScript handbook about using the
However, this configuration doesn’t seem to be working with the (default) bundler. I keep getting an
Unresolved dependencies error during
I’ve setup a basic TypeScript project on my github. The project should use code from the
shared folder, which is located one level up.
LNG_BUILD_FAIL_ON_WARNINGS=true lng build I keep getting:
...lightning-typescript-external\lightningjs-typescript-external\src\index.ts → build/appBundle.js... (!) Unresolved dependencies https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency @shared/utils (imported by src/App.ts) (!) Missing global variable name Use output.globals to specify browser global variable names corresponding to external modules @shared/utils (guessing 'utils') created build/appBundle.js in 1.8s [!] Warnings occurred and --failAfterWarnings flag present
Is this supported in Lightning-CLI? Or am I missing something in the configuration?