Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

webpack 5 with shared angular project ignoring tsconfig.tns.json #1154

Open
bufke opened this issue May 2, 2021 · 1 comment
Open

webpack 5 with shared angular project ignoring tsconfig.tns.json #1154

bufke opened this issue May 2, 2021 · 1 comment

Comments

@bufke
Copy link

bufke commented May 2, 2021

Environment

✔ Getting NativeScript components versions information...
✔ Component nativescript has 8.0.1 version and is up to date.
✔ Component @nativescript/core has 8.0.3 version and is up to date.
✖ Component @nativescript/ios is not installed.
✔ Component @nativescript/android has 8.0.0 version and is up to date.

See https://gitlab.com/burke-software/simple-fan-control/-/tree/ns8-broken as an example for producing

Describe the bug

I maintain two open source Angular + Nativescript projects with the previously recommended way (schematics) to share code. I can't run either one in NativeScript 8 with webpack 5. I suspect at least one problem is that the tsconfig.tns.json file is no longer used.

  • Seeing other issues, it appears there is little support for shared code this way. Is there any official answer if NS 8 explicitly breaks it or is it still possible to get working?
  • It looks like the reading of tsconfig.tns.json is set in the older webpack format. Is there a way to use this file with webpack 5?

I suspect the tsconfig file because I can clearly see that my files, skip lib, exclude lines are being ignored. Merging this into my tsconfig.json file instead at least gets me different errors (and breaks the web version).

To Reproduce

Clone the simple-fan-control branch and run ns run android

Expected behavior

Project should run

Sample project

Additional context

Seeing other comments, I realize this method of code sharing is not favored. Personally, I would love if the NS team could post some clarification. IMO explicitly ending support would be preferable to it just kind of not working well. Is anyone here running webpack 5 with this method of code sharing successfully? Thank you!

@Eradev
Copy link

Eradev commented Jul 30, 2021

I'd also like to have a working example of code sharing between an Angular web app and Nativescript with the newest webpack. Or was it a design decision to remove such a thing?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants