-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Webpack for development #5024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
With
Without
|
DLL plugins: Example for Angular with AOT and DLL and lots more: |
It looks like compiling without the code generation (AoT) in web pack makes somewhere a web pack context that recursively includes all *.module.ts files generated by the angular compiler. However our loader tries to load using require here, we should probably check how to import the modules from the context for the "no-aot in web" story to work. We can further use similar approach to import all "-page.xml" and "-page.css" files from app/ for vanilla NativeScript apps. |
We'll target Angular 5 and the new AngularCompilerPlugin for webpack. |
For incremental builds we can use https://github.com/webpack-contrib/cache-loader. |
To use skipCodeGeneration: true, we will have to deal with module.id being a number instead of string in web packed modules. This seems to be solvable by using __filename (which web pack seems to replace with path relative to app) and then deal with the calculation of absolute path here |
{N} CLI command webpack hook for development concerns:
After consulting with @Mitko-Kerezov, here is what we agreed:
|
Ok, so for development we will be targeting Angular 5 with the AngularCompilerPlugin and there are some changes that should happen, here is a list of some issues and how we are about to address them:
|
I'm not sure if we should provide update scripts. I think we should document the changes in the webpack configuration and release v1.0, because:
|
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. |
There PRs in the CLI and the nativescript-dev-webpack:
The implementation splits the "prepare" step into "prepare js" and "prepare native" and allows release builds using the CLI and web pack like
tns run ios --bundle --release
.We basically want to extend this and have it for development builds. We need fast incremental web pack builds.
Problems:
TODO:
Resources:
https://github.com/angular/angular/tree/master/packages/compiler-cli
angular/angular#18818
The text was updated successfully, but these errors were encountered: