-
Notifications
You must be signed in to change notification settings - Fork 39
Webpack support #15
Comments
Hi @lukashlobil please remove your previous install of this plugin and install the new
Lemme know. |
Hi @NathanWalker I used it in my main module and then had to use it in my LoginModule as well in order for it to work in my LoginModule's components. Is that correct? |
@zoeitsolutions Yes that is correct, however just make sure you only call @lukashlobil curious if |
@NathanWalker
I'm using a shared module:
Any guess? |
I cannot find .metadata.json files in the plugin.. |
I'm getting the same error as @hypery2k ERROR in Error encountered resolving symbol values statically. Calling function 'TNSFontIconModule' |
@NathanWalker any ideas? Even if I move the Module to the root Module I'm getting the error:
|
BTW: I'm using Angular 2.4.3 |
Im having the same issue, @hypery2k were you able to resolve this? |
@NathanWalker Any solutions for this?
|
@hypery2k as a temp workaround I managed to get it working by creating and importing this file https://gist.github.com/v-fedorov/945e33ffec6c7ad74133436aa23dd56c |
@NathanWalker having the same issue as reported here. Could you incorporte @v-fedorov solution or similar one? |
Hey absolutely, trying to get to this, sry for delay - next week should be better for me. |
@NathanWalker Maybe you could take a look at my fork. I think it should work, but currently getting errors during tsc The repo itself seems to have same setup issues. |
Thanks @hypery2k does using the opaquetoken sol e the error for you? |
Can't say as I'm having issues with compiling all the stuff. I'll take a look later or at the beginning of the week. |
@hypery2k Any news on this one? |
Hi @NathanWalker / @hypery2k |
@NathanWalker: With my latest changes AoT build is working fine for me |
Wicked!!! Let's get it merged @NathanWalker !!! |
hey @hypery2k how are you building the module from your fork? Looks like the file references.d.ts and if I remove it from compilation It cannot find 'file-system' module. Thank you in advanced |
hey @hypery2k or @NathanWalker I installed the latest version of the plugin with the latest changes but Aot is still not working on my side. I still don't see the metadata for the plugin. I tried to generate it myself with the npm script without luck. Any thoughts? |
@NathanWalker: My fork as I pushed worked, the metadata is missing, see https://github.com/hypery2k/nativescript-ngx-fonticon/blob/master/package.json#L47 |
@hypery2k I will have to do a AOT build at the end of the week, this is the last plugin hindering from doing that. Is there a way I can use your repo? (wanted to post this in your repo, but issues forum is not there since it is a fork). |
Would love to see this merged/fixed soon. This is the only plugin stopping us from using webpack. |
If I add it as ^2.1.2-PR-26-3 to package.json and npm install, it doesn't seem to work. But if i, afterwards, do an "npm install nativescript-ngx-fonticon@next --save", it works fine. Looking forward to having you publish the new version! |
you normally have to clean everything out, with |
@hypery2k Even with
I still get:
any thoughts please? |
@lukashlobil In my case, using version 2.1.2-PR-26-3. What I did was delete the / platforms folder and use the following command:
But...
And my icons show "undefined"... In dev mode: I'm getting this:
|
Here is my package,json and app.module: https://gist.github.com/lukashlobil/e7e81852cdc9e746fa7e79ac03cc6545 |
So, I got it working with AOT, but now it won't work without AOT :-( anyone experiencing the same? |
missing metadata added.
could you try with [email protected] |
I have the same issue. AOT compilation works fine with "2.1.2-PR-26-12". But now DEV mode is broken and shows:
|
so you're justing doing a |
related to NathanWalker#15
My build now throws the following error using your PR: ERROR in ../~/nativescript-ngx-fonticon/nativescript-ngx-fonticon.js |
FYI: My build uses webpack to bundle the app. I've found this comment: s-panferov/awesome-typescript-loader#250 (comment) Your tslib dependency is a dev dependency rather than a direct dependency. That could be the issue no? |
you can test the latest snapshot when CI build finishes: |
@hypery2k Thanks! It's working now :) |
thanks for testing ;) |
No problem. The bad news is that the regular "tns run ios --emulator" (so, no webpack) still throws the following error: "file:///app/app.module.js:9:42: JS ERROR SyntaxError: Importing binding name 'TNSFontIconPurePipe' is not found." I'm not even using it anywhere in my solution... just the regular TNSFontIconPipe. |
can you post your tsconfig? |
tsconfig.json:
tsconfig.aot.json:
|
could try this tsconfig?
|
Same result... |
The problem seems to be that nativescript-ngx-fonticon is an es2015 module and the actual issue is caused by
Webpack seems to be able to build that without any problems, but on the other hand the runtime cannot handle that. (Just a guess ;) ) |
I made another fix hypery2k#2 that resolves the crash on android: "Trying to link invalid 'this' to Java object". For me this is now working for android and ios, both webpack and tns build. @hypery2k can you publish a new tag for the PR? |
you could try with |
I can confirm that 2.1.2-PR-26-16 works both with and without webpack for our app! |
Version 2.2.0 is published now |
Hi,
is it possible to enable Webpack (AOT) support for this plugin?
I cannot use .forRoot in my main ngModule.
Thank you
The text was updated successfully, but these errors were encountered: