-
Notifications
You must be signed in to change notification settings - Fork 636
Bump angular to 4+, update year to 2017, HTML output for build via webpack #158
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
All set, I signed the CLA! :) |
CLAs look good, thanks! |
I can confirm this works. Just deployed my package on a server after I merged these changes. Thanks! |
@pascal08 if you are using this base and want Angular 4+ and other updated dependencies, I just added another commit that updates dependencies 😄 |
@@ -16,12 +17,17 @@ var webpackConfig = { | |||
plugins: [ | |||
new webpack.ContextReplacementPlugin( | |||
// The (\\|\/) piece accounts for path separators in *nix and Windows | |||
/angular(\\|\/)core(\\|\/)src(\\|\/)linker/, | |||
path.resolve(__dirname, './src'), | |||
/angular(\\|\/)core(\\|\/)@angular/, |
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.
Could you explain why you want to change 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.
This ContextReplacementPlugin
has to do with silencing some warnings that webpack outputs. See this issue: angular/angular#11580. The behavior between Angular 2.x and 4.x changed a little, and so with the update to 4.x we also want to update the webpack "workaround". If you are staying on Angular 2.x, you wouldn't want to make this change.
This specific comment in the issue addresses the updated behavior and updated webpack config: angular/angular#11580 (comment)
@mcescalante I just merged your changes and bumped my project to Angular 4. Works like a charm. This should be merged! |
Changes:
angular2-in-memory-web-api
toangular-in-memory-web-api
to reflect latest package changes (package name changed, see https://www.npmjs.com/package/angular2-in-memory-web-api)html-webpack-plugin
and plugin towebpack.config.js
so thatnpm run build
outputs a working index.html file.I have tested bumped versions with a fresh clone. Happy to make additional changes if needed for this PR!