-
-
Notifications
You must be signed in to change notification settings - Fork 449
docs(webpack): add custom application and activity section #1254
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor issues ...
|
||
### Extend Android Application | ||
|
||
If your project extends android application, it should be added as an [entry](https://github.com/NativeScript/nativescript-dev-webpack/blob/master/demo/AngularApp/webpack.config.js#L71) to the `webpack.config.js` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "extends android application" should be "extends an Android application"
|
||
In this way, the source code of [`application.android.ts`](https://github.com/NativeScript/nativescript-dev-webpack/blob/master/demo/AngularApp/app/application.android.ts) is bundled separately as `application.js` file which is loaded from the native `Application.java` class on launch. | ||
|
||
The `application.js` bundle file is independent of the `bundle.js` and `vendor.js` files and the reason for it is that they are not loaded so early in the application launch. That's why the logic in `application.android.ts` is needed to be bundled separately in order to be loaded by the native `Application.java` as early as needed on launch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "the reason for it" would sound better as "the reason for this/that"
|
||
### Extend Android Activity | ||
|
||
If your project extends android activity, it should be added to the [`appComponents`](https://github.com/NativeScript/nativescript-dev-webpack/blob/master/demo/AngularApp/webpack.config.js#L19) array by an absolute path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- again "extends an Android activity"
]; | ||
``` | ||
|
||
In this way and With the default config, these components [get](https://github.com/NativeScript/nativescript-dev-webpack/blob/master/demo/AngularApp/webpack.config.js#L109-L116) in the common *vendor.js* chunk and are required by the [`android-app-comopnents-loader`](https://github.com/NativeScript/nativescript-dev-webpack/blob/master/demo/AngularApp/webpack.config.js#L146-L149). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- not sure why "With" is capitalized
- a typo in "android-app-comopnents-loader"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these sections should be part of the docs article for extending application and activity. The webpack article can link to the sections in the other article.
Move custom application and activity webpack configuration information to the `extend-application-activity.md` article.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
PR Checklist
What is the new state of the documentation article?
Add custom application and activity configuration information.
Describes NativeScript/nativescript-dev-webpack#564 (comment).