Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Allow custom platform plugins to mix with NativeScript core modules #1122

Copy link
Copy link
Open
@bundyo

Description

@bundyo
Issue body actions

Is your feature request related to a problem? Please describe.
Currently NativeScript doesn't support other platforms than iOS and Android. In order to make this possible, we need to somehow redirect the custom platforms to external plugins.

Describe the solution you'd like
An env.platform option in dev-webpack that will allow specifying the name of the external platform and dev-webpack to load its files from there. In order for the platform to be able to access the {N} core modules, we need somehow to "mix" the plugin and the core modules files, in order for core modules to find the needed platform files.
This can be done through specifying a separate bundle-entry-points file inside the plugin in order to list less or more module entry points and the the dev-webpack file system plugin to redirect the external platform files to the external plugin. Then Webpack can be started with:

npx webpack --env.platform desktop --watch

(this means no CLI support for external platforms for now, as this calls for more extensive planning).

Describe alternatives you've considered
Adding new platforms inside core modules, but this requires core modules to be forked and updates become a bit of a problem.

Additional context
I'm planning on creating a two external platforms from the PoC projects I've created in the past - Web and Desktop.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.