-
-
Notifications
You must be signed in to change notification settings - Fork 447
refactor: Update article for WebPack bundling via CLI with --bundle flag #993
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.
Looks good! I only had some minor things.
fyi this other documentation page is going to need some updates as well: https://docs.nativescript.org/best-practices/startup-times. Let me know if you want to tackle that as part of this.
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.
in Publishing for iOS article.
in the Publishing for iOS article.
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.
applicaiton
application
WebPack
This article should stick with either webpack, Webpack, or WebPack for consistency.
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.
Here’s you would build for release with uglify on Android:
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.
And here’s you you would build for release with uglify on iOS:
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.
Thanks, @tjvantoll - pushed all changes + updated the "How to build apps that starts fast" article as well
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.
You didn’t change this, but...
Windows machine.
Should be
Windows machines.
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 --env.aot
flag can be used in combination with --env.uglify
and --env.snapshot
. (Note that snapshots are available for Android only.)
I just moved around the periods.
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.
Wow that was fast :)
I added one more very trivial comment. Looks good!
docs/best-practices/startup-times.md
Outdated
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.
Angular Ahead-of-Time,
Angular Ahead-of-Time compilation (if using Angular),
Just because this article is for Angular and non-Angular users.
0fb5d89
to
e5494ad
Compare
Change WebPack to Webpack or just webpack
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.
nativescript-dev-webpack does that by default. Should we mention it explicitly here?
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.
We need to note somewhere that AoT is not the default now. It can be enabled by:
tns run android --bundle --env.aot
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.
Done with the section below - Angular Ahead-of-Time Compilation Build (AOT)
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.
We have the same section above?
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.
@NickIliev This section is a bit unclear to me -- at the beginning (line 69) it says you have to register your modules to work with webpack bundles:
global.registerModule("main-page", () => require("./main-page"));
But then (the new section) says register them like:
const context = require.context("~/", true, /(page|fragment)\.(xml|css|js|ts|scss|less|sass)$/); global.registerWebpackModules(context);
As far as I can understand both approaches achieve the same purpose (the latter does not require you to list explicitly all modules) but it is not obvious from the text content that is so.
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.
@manoldonev absolutely right! - revising the article right away by removing the obsolete snippet.
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.
Updating article for bundling with WebPack to comply with the
--uglify
flag that is introduced with the upcoming version of NativeScript 3.4.Related to NativeScript/NativeScript#5129
Related to NativeScript/nativescript-dev-webpack#328