Skip to content
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

Webpack 4 - optimization section under configuration #1968

Closed
20 tasks done
EugeneHlushko opened this issue Mar 28, 2018 · 8 comments
Closed
20 tasks done

Webpack 4 - optimization section under configuration #1968

EugeneHlushko opened this issue Mar 28, 2018 · 8 comments
Assignees

Comments

@EugeneHlushko
Copy link
Member

EugeneHlushko commented Mar 28, 2018

@jeremenichelli
Copy link
Member

Is the intention to tackle some examples on best solutions? Or simply explain configurations of each option? I'm getting the feeling that this could generate duplicated content easily if we are not careful.

@EugeneHlushko
Copy link
Member Author

The plan was to mention these things and what they are doing, what options are available and what the defaults are. Do you think the list should be extended or shortened @jeremenichelli ?

@jeremenichelli
Copy link
Member

My fear is to have duplicated references for the same content, but we can always give it a try and see if it does work. There are config that naturally are already present like the plugins for example, so it owuld be good to breifly describe them and link to their proper page, but extend the content on the ones that actually have no other explanation on the site.

@EugeneHlushko
Copy link
Member Author

I got your point, yes everything that has its core page from the list above will be only briefly mentioned and linked to 👍 i did not understand your concern from the first time 😓 😆 @jeremenichelli
P.S. picking this up soon, was busy IRL

@jeremenichelli
Copy link
Member

@EugeneHlushko don't worry man, all good. Let me know when you have something, I'll checkout the PR and give it a look locally to see how the final content looks.

@Aqours
Copy link

Aqours commented Jun 12, 2018

sideEffects section is very puzzling.

// src/index.ts
import './polyfills';
export function f() {}


// src/polyfills.ts
import 'promise-polyfill/src/polyfill';
import 'reflect-metadata'; // npm package

The above content is my TypeScript code.

// config1
// package.json
{
  "sideEffects": [
    "src/polyfills.ts"
  ],
}
// config2
// package.json
{
  "sideEffects": [
    "src/index.ts"
  ],
}

The bundle file include polyfills.ts and promise-polyfill and reflect-metadata npm packages when I use config1, but exclude polyfills.ts and promise-polyfill and reflect-metadata npm packages when I use config2.

I think sideEffects section should account for why config1 include sub-import files and config2 does not. We need more details.

@jeremenichelli
Copy link
Member

@Aqours can you put this in a separate issue, I don't it belongs to this discussion and tell us what would work for you better as content in that section. Thanks in advance!

@montogeek
Copy link
Member

All done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants