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

[pull] canary from vercel:canary #553

Merged
merged 8 commits into from
Dec 24, 2022
Merged

[pull] canary from vercel:canary #553

merged 8 commits into from
Dec 24, 2022

Conversation

pull[bot]
Copy link

@pull pull bot commented Dec 23, 2022

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

Updated dependencies for tailwindcss and typescript.
@pull pull bot requested a review from timneutkens as a code owner December 23, 2022 09:44
@pull pull bot added the ⤵️ pull label Dec 23, 2022
styfle and others added 7 commits December 23, 2022 16:57
The default behavior for svg is `dangerouslyAllowSVG: false` which means we won't try to optimize the image because its vector (see #34431 for more).

However, svg was incorrectly getting the `srcset` attribute assigned which would contain duplicate information like:

```
/test.svg 1x, /test.svg 2x
```

So this PR makes sure we treat svg the same as `unoptimized: true`, meaning there is no `srcset` generated. Note that this PR won't change the behavior if `loader` is defined or if `dangerouslyAllowSVG: true`.
Currently we use `this.appDir + entryName` as the key of app entries. The `appDir` part is an absolute path which contains `\` in Windows, but `entryName` is a general entry name for Webpack, like `app/page`. A quick fix is to replace all `/` in the entry name with the current system separator.

Confirmed that it fixed the problem in Windows.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
When `modularizeImports` was moved out of experiimental [on this PR](#44240), `docs` and `examples` were not updated.

- Update `modularize-imports` example by removing `experimental` from `next.config.js`, as it's currently failing when deployed
- For docs: https://nextjs.org/docs/advanced-features/compiler#modularize-imports
  - Move `Modularize Imports` section outside of `Experimental Features` section 
  - Remove `experimental` from code snippets
  - Added to version history, just like when SWC Minifier became stable.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
@pull pull bot merged commit 4ac737e into MLH-Fellowship:canary Dec 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants