Define how to build Microapps with bundle workflow #4643
Labels
build
Describes issues related to build operations
feature
migration-to-bundle
The issue is describing a breaking change in the Bundle workflow compared to the Legacy one.
preview
Describes issues related to preview command
severity: critical
webpack
Milestone
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 containnode_modules
- all of them will be in thevendor.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 haverequire
statements, which will fail, as there are nonode_modules
in the built application. They can be accessed viawebpack 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.
The text was updated successfully, but these errors were encountered: