New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Webpack5] Other platform code wrongfully included in bundle #9682
Comments
|
There is no flip transition implementation for iOS as it is built into the iOS ViewController. If you import it into a common file or a NativeScript core code only uses the flip transition internally for the NavigationEntry transition when switching views on android. |
|
I understand, the above was just an example. In my case this fails even if the code is located in the |
|
@manijak as a quick test, can you add the following to your webpack config: // at the top
const { ContextExclusionPlugin } = require('webpack')
// in the config part...
webpack.chainWebpack(config => {
if(webpack.Utils.platform.getPlatformName() === 'ios') {
config
.plugin('ContextExclusionPlugin|.android.ts')
.use(ContextExclusionPlugin, [new RegExp(`\.android\.ts$`)]);
}
})And let me know if that fixes the issue? |
|
It sure did. Thanks! So this basically ignores the android parts of a "plugin" while building for iOS platform? |
|
@manijak cool, yeah this confirms to me what the issue is - you can use that until we push a fix in the configs... The core flavors work by using We can probably export the platforms object, and get the keys, remove current platform, and then generate a regex that excludes all other platform files (not just .ts): NativeScript/packages/webpack5/src/helpers/platform.ts Lines 18 to 23 in 37cc612
|
Issue Description
When using the
FlipTransitionclass the app fails to compile. UsingSlideTransitionorFadeTransitioncauses no issues.Reproduction
"@nativescript/core": "~8.1.5",
"@nativescript/android": "~8.1.1",
"@nativescript/ios": "~8.1.0",
"@nativescript/types": "~8.1.1",
"@nativescript/webpack": "~5.0.1",
"typescript": "4.3.5"
Relevant log output (if applicable)
No response
Environment
No response
The text was updated successfully, but these errors were encountered: