-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makes sure font loader CSS ends up correctly in the Flight Manifest and Flight Client Entries. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `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` - [ ] Integration 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` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
- Loading branch information
Hannes Bornö
authored
Sep 27, 2022
1 parent
b24800b
commit f53f581
Showing
38 changed files
with
467 additions
and
84 deletions.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
/* target file for webpack loader */ |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
/* target file for webpack loader */ |
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
4 changes: 2 additions & 2 deletions
4
packages/next-swc/crates/core/tests/errors/next-font-loaders/export-let/output.js
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import firaCode from "@next/font/google?pages/test.tsx;Abel"; | ||
import inter from "@next/font/google?pages/test.tsx;Inter"; | ||
import firaCode from "@next/font/google/target.css?pages/test.tsx;Abel"; | ||
import inter from "@next/font/google/target.css?pages/test.tsx;Inter"; | ||
import React from 'react'; | ||
export { firaCode }; | ||
export { inter }; |
4 changes: 2 additions & 2 deletions
4
packages/next-swc/crates/core/tests/errors/next-font-loaders/not-const/output.js
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import inter1 from '@next/font/google?pages/test.tsx;Inter;{"variant":"400"}'; | ||
import inter2 from '@next/font/google?pages/test.tsx;Inter;{"variant":"400"}'; | ||
import inter1 from '@next/font/google/target.css?pages/test.tsx;Inter;{"variant":"400"}'; | ||
import inter2 from '@next/font/google/target.css?pages/test.tsx;Inter;{"variant":"400"}'; | ||
var i = 10; | ||
var i2 = 20; |
8 changes: 4 additions & 4 deletions
8
packages/next-swc/crates/core/tests/errors/next-font-loaders/options-object/output.js
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
2 changes: 1 addition & 1 deletion
2
packages/next-swc/crates/core/tests/errors/next-font-loaders/spread-arg/output.js
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import inter from "@next/font/google?pages/test.tsx;Inter;{};[]"; | ||
import inter from "@next/font/google/target.css?pages/test.tsx;Inter;{};[]"; | ||
const a = fn(...{}, ...[]); |
2 changes: 1 addition & 1 deletion
2
packages/next-swc/crates/core/tests/fixture/next-font-loaders/default-import/output.js
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 |
---|---|---|
@@ -1 +1 @@ | ||
import font from 'cool-fonts?pages/test.tsx;;{"prop":true}'; | ||
import font from 'cool-fonts/target.css?pages/test.tsx;;{"prop":true}'; |
4 changes: 2 additions & 2 deletions
4
packages/next-swc/crates/core/tests/fixture/next-font-loaders/export-const/output.js
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import firaCode from "@next/font/google?pages/test.tsx;Abel"; | ||
import inter from "@next/font/google?pages/test.tsx;Inter"; | ||
import firaCode from "@next/font/google/target.css?pages/test.tsx;Abel"; | ||
import inter from "@next/font/google/target.css?pages/test.tsx;Inter"; | ||
import React from 'react'; | ||
export { firaCode }; | ||
export { inter }; |
4 changes: 2 additions & 2 deletions
4
packages/next-swc/crates/core/tests/fixture/next-font-loaders/exports/output.js
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import firaCode from "@next/font/google?pages/test.tsx;Abel"; | ||
import inter from "@next/font/google?pages/test.tsx;Inter"; | ||
import firaCode from "@next/font/google/target.css?pages/test.tsx;Abel"; | ||
import inter from "@next/font/google/target.css?pages/test.tsx;Inter"; | ||
import React from 'react'; | ||
export { firaCode }; | ||
export default inter; |
2 changes: 1 addition & 1 deletion
2
packages/next-swc/crates/core/tests/fixture/next-font-loaders/font-options/output.js
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import firaCode from '@next/font/google?pages/test.tsx;Fira_Code;{"fallback":["system-ui",{"key":false},[]],"key":{"key2":{}},"preload":true,"variant":"400"}'; | ||
import firaCode from '@next/font/google/target.css?pages/test.tsx;Fira_Code;{"fallback":["system-ui",{"key":false},[]],"key":{"key2":{}},"preload":true,"variant":"400"}'; | ||
import React from 'react'; | ||
console.log(firaCode); |
2 changes: 1 addition & 1 deletion
2
packages/next-swc/crates/core/tests/fixture/next-font-loaders/import-as/output.js
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import acme1 from 'cool-fonts?pages/test.tsx;Acme;{"variant":"400"}'; | ||
import acme1 from 'cool-fonts/target.css?pages/test.tsx;Acme;{"variant":"400"}'; | ||
import React from 'react'; |
2 changes: 1 addition & 1 deletion
2
packages/next-swc/crates/core/tests/fixture/next-font-loaders/many-args/output.js
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 |
---|---|---|
@@ -1 +1 @@ | ||
import geo from '@next/font/google?pages/test.tsx;Geo;"test";[1.0];{"a":2.0};3.0'; | ||
import geo from '@next/font/google/target.css?pages/test.tsx;Geo;"test";[1.0];{"a":2.0};3.0'; |
4 changes: 2 additions & 2 deletions
4
packages/next-swc/crates/core/tests/fixture/next-font-loaders/multiple-calls/output.js
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import inter from '@next/font/google?pages/test.tsx;Inter;{"display":"swap","variant":"900"}'; | ||
import inter from '@next/font/google?pages/test.tsx;Inter;{"display":"swap","variant":"900"}'; | ||
import inter from '@next/font/google/target.css?pages/test.tsx;Inter;{"display":"swap","variant":"900"}'; | ||
import inter from '@next/font/google/target.css?pages/test.tsx;Inter;{"display":"swap","variant":"900"}'; | ||
import React from 'react'; |
4 changes: 2 additions & 2 deletions
4
.../next-swc/crates/core/tests/fixture/next-font-loaders/multiple-font-downloaders/output.js
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import inter from '@next/font/google?pages/test.tsx;Inter;{"variant":"900"}'; | ||
import fira from 'cool-fonts?pages/test.tsx;Fira_Code;{"display":"swap","variant":"400"}'; | ||
import inter from '@next/font/google/target.css?pages/test.tsx;Inter;{"variant":"900"}'; | ||
import fira from 'cool-fonts/target.css?pages/test.tsx;Fira_Code;{"display":"swap","variant":"400"}'; | ||
import React from 'react'; |
4 changes: 2 additions & 2 deletions
4
packages/next-swc/crates/core/tests/fixture/next-font-loaders/multiple-fonts/output.js
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import firaCode from '@next/font/google?pages/test.tsx;Fira_Code;{"fallback":["system-ui"],"variant":"400"}'; | ||
import inter from '@next/font/google?pages/test.tsx;Inter;{"display":"swap","variant":"900"}'; | ||
import firaCode from '@next/font/google/target.css?pages/test.tsx;Fira_Code;{"fallback":["system-ui"],"variant":"400"}'; | ||
import inter from '@next/font/google/target.css?pages/test.tsx;Inter;{"display":"swap","variant":"900"}'; | ||
import React from 'react'; |
4 changes: 2 additions & 2 deletions
4
packages/next-swc/crates/core/tests/fixture/next-font-loaders/multiple-imports/output.js
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import inter from '@next/font/google?pages/test.tsx;Inter;{"variant":"900"}'; | ||
import fira from '@next/font/google?pages/test.tsx;Fira_Code;{"display":"swap","variant":"400"}'; | ||
import inter from '@next/font/google/target.css?pages/test.tsx;Inter;{"variant":"900"}'; | ||
import fira from '@next/font/google/target.css?pages/test.tsx;Fira_Code;{"display":"swap","variant":"400"}'; | ||
import React from 'react'; |
2 changes: 1 addition & 1 deletion
2
packages/next-swc/crates/core/tests/fixture/next-font-loaders/no-args/output.js
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 |
---|---|---|
@@ -1 +1 @@ | ||
import fira from "@next/font/google?pages/test.tsx;Fira_Code"; | ||
import fira from "@next/font/google/target.css?pages/test.tsx;Fira_Code"; |
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
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
Oops, something went wrong.