EddyVerbruggen / nativescript-i18n

This is a plugin for Nativescript that implements native i18n in an easy manner.
65 stars 30 forks source link

Support Webpack #49

Closed manojdcoder closed 7 years ago

manojdcoder commented 7 years ago

Webpack bundle fails when plugin is included in a project. I'm not a expert here, but as suggested by @sis0k0 at NativeScript/nativescript-dev-webpack/issues/141, generating metadata for exported NgModule should fix this.

masseelch commented 7 years ago

@manojdcoder Please see #42.

manojdcoder commented 7 years ago

@MasseElch Not sure whether #42 is related here, but i'm getting same error as you mentioned in your comment and I was advised to generate metadata for this module which should fix this. Yet to dive in deep and check.

masseelch commented 7 years ago

I might be wrong, but i think this module DOES already provide Metadata in the @NgModule decorator in angular.ts. Lets wait and see what @rborn has to say.

rborn commented 7 years ago

@manojdcoder @MasseElch I made some changes to the angular.ts and the demo app builds fine but the app will present an empty activity (the title is there though) I'm sorry but I don't really know how to fix this 😢

kssfilo commented 7 years ago

@manojdcoder

git clone https://github.com/manojdcoder/nativescript-webpack-sass.git

npm install
npm run build-android-bundle

-> ERROR in Error encountered resolving symbol values statically. Reference to a non-exported class L.  …

edit package.json

"tns-core-modules": "rc",
"nativescript-i18n": "^0.1.6”,

->

"tns-core-modules": “^3.0.0”,
"nativescript-i18n": "^0.2.1”,

remove node_modules and run “npm install ;npm run build-android-bundle“

-> Works fine

manojdcoder commented 7 years ago

@kssfilo Thanks a lot for letting me know, the latest version fixed all the issues.

rborn commented 7 years ago

@manojdcoder @kssfilo what about #42 ? Thanks.

manojdcoder commented 7 years ago

@rborn Sorry, I was just able to test and android build is perfectly fine. Thanks!