Skip to content

Support NativeScript 8 #77

Description

@shirakaba

I've so far updated RNS itself to support NativeScript v8 (that's react-nativescript@3.0.0-beta.1 for anyone interested), but it means nothing until I've also updated the RNS Webpack config to support Webpack v5. After that, I'll need to make React plugins for Tabs and BottomNavigation and update RNS Navigation correspondingly. Finally, I'll need to update the RNS app template. I may need to update the RNS docs, too.

The immediate hurdle is the Webpack config.

@rigor789 I'm getting this error when supplying this webpack.config.js which is just the JS equivalent of your configuration.react.ts:

$ tns run ios --emulator
Searching for devices...

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*                                                                                                           *
*  The platforms/ios folder appears to be invalid. If the build fails, run 'ns clean' and rebuild the app.  *
*                                                                                                           *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Preparing project...
typeof configs.base: function
[@nativescript/webpack] Warn: 
 You need to provide a target platform!

Available platforms: android, ios

Use --env.platform=<platform> or --env.android, --env.ios to specify the target platform.

Defaulting to "ios".
TypeError: config.mode is not a function
    at Object.default_1 [as base] (/Users/jamie/Documents/git/react-nativescript/sample/node_modules/@nativescript/webpack/dist/configuration/base.js:28:12)
    at module.exports (/Users/jamie/Documents/git/react-nativescript/sample/webpack.config.js:13:10)
    at Command.<anonymous> (/Users/jamie/Documents/git/react-nativescript/sample/node_modules/@nativescript/webpack/dist/bin/index.js:60:44)
    at Command.listener [as _actionHandler] (/Users/jamie/Documents/git/react-nativescript/sample/node_modules/commander/index.js:922:31)
    at Command._parseCommand (/Users/jamie/Documents/git/react-nativescript/sample/node_modules/commander/index.js:1503:14)
    at Command._dispatchSubcommand (/Users/jamie/Documents/git/react-nativescript/sample/node_modules/commander/index.js:1443:18)
    at Command._parseCommand (/Users/jamie/Documents/git/react-nativescript/sample/node_modules/commander/index.js:1460:12)
    at Command.parse (/Users/jamie/Documents/git/react-nativescript/sample/node_modules/commander/index.js:1292:10)
    at Object.<anonymous> (/Users/jamie/Documents/git/react-nativescript/sample/node_modules/@nativescript/webpack/dist/bin/index.js:97:21)
    at Module._compile (internal/modules/cjs/loader.js:1236:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1257:10)
    at Module.load (internal/modules/cjs/loader.js:1085:32)
    at Function.Module._load (internal/modules/cjs/loader.js:950:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47
No configuration!
Executing webpack failed with exit code 0.

I also looks like the Webpack API has possibly changed from webpack.init(env) to configs.base(config, env) since you wrote the docs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions