You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've started to play with plugins and ran into one problem. Let's say I want to write a plugin with a single module that has different behavior for iOS and Android. So I use three files: index.ios.js, index.android.js, and common.js.
Here's the problem: in my package.json I say that my "main" is "index.js", but, when the module gets copied into the appropriate platform/ios and platform/android folders its name does not change, like the tns_modules do. For instance color.ios.js magically becomes color.js in platforms/ios.
Unless I'm missing something, it looks like the CLI needs to change filename.android.js --> filename.js when it moves the file into platforms/android and filename.ios.js --> filename.js when it moves into platforms/ios.
Thanks.
The text was updated successfully, but these errors were encountered:
Hey all,
I've started to play with plugins and ran into one problem. Let's say I want to write a plugin with a single module that has different behavior for iOS and Android. So I use three files:
index.ios.js
,index.android.js
, andcommon.js
.Here's the problem: in my
package.json
I say that my"main"
is"index.js"
, but, when the module gets copied into the appropriateplatform/ios
andplatform/android
folders its name does not change, like thetns_modules
do. For instancecolor.ios.js
magically becomescolor.js
inplatforms/ios
.Unless I'm missing something, it looks like the CLI needs to change
filename.android.js
-->filename.js
when it moves the file intoplatforms/android
andfilename.ios.js
-->filename.js
when it moves intoplatforms/ios
.Thanks.
The text was updated successfully, but these errors were encountered: