Skip to content

Integrating Webpack 4#4320

Merged
dzearing merged 8 commits intomicrosoft:masterfrom
dzearing:webpack-4
Mar 24, 2018
Merged

Integrating Webpack 4#4320
dzearing merged 8 commits intomicrosoft:masterfrom
dzearing:webpack-4

Conversation

@dzearing
Copy link
Copy Markdown
Member

This change updates to webpack 4 and ts-loader.

It also adjusts typings locations in package.json, while also adding module entry points and sideEffects: false for tree shaking to work.

It does not change the /lib/ references anywhere. We'll need to figure that out in a separate step.

Comment thread scripts/package.json
"@microsoft/loader-load-themed-styles": "^1.6.0",
"@uifabric/merge-styles": ">=5.13.0 <6.0.0",
"autoprefixer": "^7.1.5",
"awesome-typescript-loader": "^3.2.3",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the switch?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm going to revert to trim down changes.

Comment thread scripts/tasks/webpack-resources.js Outdated
optimization: {
concatenateModules: true,
minimize: true
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are the defaults for mode:production, you can omit this

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you aren't seeing dev mode work, you probably need to update merge to make sure that you are deep copying all properties in the config when merging. We had a similar issue where our "merge" ended up with a reference to the same optimization object for development and production mode, which caused the defaults webpack applies in the devmode run to get applied in production mode.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I know about mode but i was testing these individually,.

@dzearing dzearing merged commit 3808907 into microsoft:master Mar 24, 2018
@dzearing dzearing deleted the webpack-4 branch March 24, 2018 22:55
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants