-
-
Notifications
You must be signed in to change notification settings - Fork 71
Custom build time extension #200
Comments
#96 may be the answer to this currently, but it seems like the typing for config allows objects for |
I tried the following config to mimic what is in the preset for RN, but it didn't seem to work. I tried adding an {
"entry": [
{
"file": "index.js",
"label": "android",
"extend": {
"extensions": [
".android.js",
".android.ts",
".android.tsx",
".native.js",
".native.ts",
".native.tsx",
".js",
".ts",
".tsx"
]
}
},
{
"file": "index.js",
"label": "ios",
"extend": {
"extensions": [
".ios.js",
".ios.ts",
".ios.tsx",
".native.js",
".native.ts",
".native.tsx",
".js",
".ts",
".tsx"
]
}
},
{
"file": "index.js",
"label": "xyz",
"extend": {
"extensions": [".ts", ".tsx", ".js", ".xyz.ts", ".xyz.tsx"]
}
},
{
"file": "index.js",
"label": "abc",
"extend": {
"extensions": [".ts", ".tsx", ".js", ".abc.ts", ".abc.tsx"]
}
}
],
"extensions": [
".ts",
".tsx",
".js"
],
...
} |
Figured this out, apparently it came down to not having the base config |
To support this fully, below is my {
"entry": [
{
"file": "index.js",
"label": "android",
"extend": {
"extensions": [".android.js", ".android.ts", ".android.tsx"]
}
},
{
"file": "index.js",
"label": "ios",
"extend": {
"extensions": [".ios.js", ".ios.ts", ".ios.tsx"]
}
},
{
"file": "index.js",
"label": "abc",
"extend": {
"extensions": [".abc.js", ".abc.jsx", ".abc.ts", ".abc.tsx"]
}
},
{
"file": "index.js",
"label": "xyz",
"extend": {
"extensions": [".xyz.js", ".xyz.jsx", ".xyz.ts", ".xyz.tsx"]
}
}
],
"extensions": [
".android.js",
".android.ts",
".android.tsx",
".d.ts",
".ios.js",
".ios.ts",
".ios.tsx",
".js",
".jsx",
".ts",
".tsx"
],
...
} |
I have a project that has build time extensions in React Native, like #4, but for app white labels. So expand the concepts of that issue to:
We don't use the
.android/ios/native
, but do use.xyz/abc
. Is there any way to use the configuration to haveunimported
sense these files as imported under special conditions like the other RN files? I have added them to myextensions
like I see here, but I'm not sure how to customize my entry to enable this or if it's possible.Simply ignoring files with these extensions shows some other files as unimported erroneously.
The text was updated successfully, but these errors were encountered: