NathanWalker / nativescript-ngx-fonticon

Use custom font icon collections seamlessly with NativeScript + Angular.
MIT License
76 stars 39 forks source link

RE: Icon doesn't show up when using nativescript-dev-webpack #44

Open samliaw opened 5 years ago

samliaw commented 5 years ago

Test With nativescript-dev-webpack.zip

Attached is a project excluding node_modules, platforms and hooks.

When I compile this project using this command "tns run android --emulator", I am able to see the icon. However, when i built it with nativescript-dev-webpack using this command "tns run android --bundle", I am not able to see the icon at all.

I try it with my existing project and it behaves the same.

There is no error on the screen.

NickIliev commented 5 years ago

@samliaw the solution can be found here

rynop commented 5 years ago

I just put fontawesome.css in src/fonts dir then do:

    imports: [
        NativeScriptCommonModule,
        TNSFontIconModule.forRoot({
            fa: './fonts/fontawesome.css'
        })
    ],

This way I don't have to tinker with webpack.config.js (which gets auto-generated and updated frequently)

@NickIliev you are much more seasoned with NS - you see any downside to this approach?