Skip to content

Define how to build Microapps with bundle workflow #4643

Closed
@rosen-vladimirov

Description

@rosen-vladimirov

Is your feature request related to a problem? Please describe.
As in NativeScript 6.0 bundle workflow will be the only one, we need to find a way to build Microapps with it. More information about Microapps is available here
The problem with them is that there's a single NativeScript application (lets call it container) and differente micro applications can be installed in it. When the container application is built with webpack, the application will include only the node_modules used by the container app. This limits the modules that can be used by the Microapps. Also, the code of the container will not contain node_modules - all of them will be in the vendor.js file produced by webpack. The code of the Microapps is not bundled by default, its just pure JavaScript. This means the code of the Microapps will have require statements, which will fail, as there are no node_modules in the built application. They can be accessed via webpack require, but this means the Microapps will have to be build with bundle. By default, the Microapps are not build at all, they are just pure JavaScript.

Describe the solution you'd like
Provide guidelines and easy way to configure application in a way that all node_modules will be transferred to the native mobile app. Extend this by allowing these node_modules to be consumed by external JavaScript code loaded in the app (i.e. which is not part of the application during building it).

Describe alternatives you've considered
Provide alternate way of building applications without webpack.

Metadata

Metadata

Assignees

Labels

buildDescribes issues related to build operationsfeaturemigration-to-bundleThe issue is describing a breaking change in the Bundle workflow compared to the Legacy one.previewDescribes issues related to preview commandseverity: criticalwebpack

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions