-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: add dll support * misc: fix dependency category fix: load zone.js for dev in 2 sub entries * misc: clean dll directory * misc: fix caching bug
- Loading branch information
1 parent
d7c390c
commit aa48e9a
Showing
3 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ npm-debug.log | |
/.awcache | ||
.webpack.json | ||
/compiled/ | ||
dll/ | ||
|
||
# Doc # | ||
/doc/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aa48e9a
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.
@shlomiassaf @d3viant0ne Thanks for this change. Is there any wiki around using dll in this project?
aa48e9a
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.
@asadsahi
DLL is integrated into the project as is.
You can look at
webpack.dev.js
for plugin configuration (DllBundlesPlugin
)There are 3 properties to configure:
bundles
An object with key's representing bundle names, value is an array of all packages to include in that bundle.
dllDir
The directory to store dll file.
webpackConfig
Webpack config object/factory or the path to it
The plugin use this config to fire up a new webpack instance and bundle the dll's.
This is usually the same as your current configuration without plugins...
See more info here
Now that you know, would you be kind a post a PR with some doc's about it?
Will help us a lot!
Thanks
aa48e9a
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 @shlomiassaf
How about this ? :)
One thing I couldn't figure out, how can this plugin help in achieving DLL better than implementing DLL using native DLL plugins. I have it configured in one of my project which is based on .net core spa project. One difference I can find is that in my project, I have to create dlls before running the project.
aa48e9a
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.
@asadsahi Thanks!
The plugin is just an easy way to control the bundle and its integrity from one place as part of Webpack.
It does what you would normally do natively... same thing.
Your native solution needs to make sure nothing has changed, this is handled for you, including DllPlugin and DllReferencePlugin injections to the appropriate places.
The main reason for this plugin is to allow quick opt-out, just remove the plugin and your are done.
In a native solution you need to remove different pieces from different places, remove scripts etc..
There is no new "technology" here, just making it easier to use.
aa48e9a
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.
@shlomiassaf That makes sense now. Thanks.
Got few questions:
I was gonna list them here, but raised it here: :)
aa48e9a
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.
should we remove this line ?
https://github.com/AngularClass/angular2-webpack-starter/blob/master/config/webpack.common.js#L61
aa48e9a
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 its there for some reason, for aot I think, but there seems to be duplication in polyfill creation I observed as well.
I am confused with my configuration where to to put polyfills entry which works for dev, prod and aot.
aa48e9a
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.
@maxisam @asadsahi - I'm in the middle or refactoring the webpack configs to simplify this process and allow the additions of vendor libs / pollyfills / plugins without needing to modify the webpack configs directly.
Should have an initial pass in a PR this evening.
aa48e9a
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.
@d3viant0ne nice to hear that.