Closed lostation closed 2 years ago
So it seems, while running nx run nativescript-app:android:dev, webpack fallbacks to a default config or entry... It seems webpack is looking for a Workspace root level folder src that doesn't exist -> src/index.js But the webpack.config.js is running... so is there entry point or context to customize, override, verify ?
Hi guys,
Please, I need help...
I'm really scratching my head from weeks now to migrate my old "shared angular tns project" and create nx workspace for web and nativescript with angular...
Every core things have been transferred to the libs/xplat ... and I've put all my pages, routes etc into apps/nativescript-app.
Nx concept should make my working days happier but for now, really it is not the case...I hope one day it will ;) ...
Anyway, I tried so many different configurations of package version to stick with angular 13 and to get everything that fits.
But know I need some help to debug WTH is happening with WEBPACK.
Webpack has always be the obscurest part of compiling stuffs. Now I'm sure.
Then...everything should be ready for mobile app part -> nx run nativescript-app:android:dev
and Crash Boom...
Here the thing that's making me crazy.
I've redo another empty project to compare...and this one is working fine with Webpack... I've checked and compared every same files, project.json, tsconfig, workspace.json etc...
But for the big fulfilled mobile project (with app and core files)...it's not webpacking...and stucked with the error above But for the another demo project it's working...
Do you know or already had this kind of message ? Can you tell my some way to debug weback and understand what's wrong... I'm spending all my days to understand why ... searching on the internet... It's exhausting...really.
I've also others questions...
I don't know how to deal the right way with webpackConfigPath: './webpack-custom.config.js' from the NativeScriptConfigto be able to do some files maintenances before the final return webpack.resolveConfig(). I saw that there is a custom Webpack for nativescript with chain able things...but truly ununderstandable for me...how to use that...It seems after the webpack.resolveConfig() I cannot do anything and add other things into the resolved config... ??? I want to be able to pass some variable to the process.env...how to do that ? Can you show me example of webpack customizations ?
I don't know how to deal with local npm custom package folder that contains some java files declared from workspace package.json. -> ex: from dependencies "nativescript-markdown-view": "file:ns-libs/nativescript-markdown-view",
I've created an ns-libs at workspace level...I don't know why the java file are not compiled...I've this -> Error executing Static Binding Generator: Class not found com.custom.markwon.StringCallback... Should I put all this custom local lib into the app folder ? But then I cannot access them from the xplat... ??? Should I create some .aar to contain the java classes ? How to do that ?
I've added ns-libs folders into tsconfig.app.json
Thanks in advance for any help ; )