-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
03d2a78
commit d3645d5
Showing
51 changed files
with
203 additions
and
241 deletions.
There are no files selected for viewing
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/target.css?{"arguments":[],"import":"Abel","path":"pages/test.tsx","variableName":"firaCode"}'; | ||
import inter from '@next/font/google/target.css?{"arguments":[],"import":"Inter","path":"pages/test.tsx","variableName":"inter"}'; | ||
import firaCode from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Abel","arguments":[],"variableName":"firaCode"}'; | ||
import inter from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Inter","arguments":[],"variableName":"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/target.css?{"arguments":[{"variant":"400"}],"import":"Inter","path":"pages/test.tsx","variableName":"inter1"}'; | ||
import inter2 from '@next/font/google/target.css?{"arguments":[{"variant":"400"}],"import":"Inter","path":"pages/test.tsx","variableName":"inter2"}'; | ||
import inter1 from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Inter","arguments":[{"variant":"400"}],"variableName":"inter1"}'; | ||
import inter2 from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Inter","arguments":[{"variant":"400"}],"variableName":"inter2"}'; | ||
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/target.css?{"arguments":[{},[]],"import":"Inter","path":"pages/test.tsx","variableName":"inter"}'; | ||
import inter from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Inter","arguments":[{},[]],"variableName":"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/target.css?{"arguments":[{"prop":true}],"import":"","path":"pages/test.tsx","variableName":"font"}'; | ||
import font from 'cool-fonts/target.css?{"path":"pages/test.tsx","import":"","arguments":[{"prop":true}],"variableName":"font"}'; |
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/target.css?{"arguments":[],"import":"Abel","path":"pages/test.tsx","variableName":"firaCode"}'; | ||
import inter from '@next/font/google/target.css?{"arguments":[],"import":"Inter","path":"pages/test.tsx","variableName":"inter"}'; | ||
import firaCode from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Abel","arguments":[],"variableName":"firaCode"}'; | ||
import inter from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Inter","arguments":[],"variableName":"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/target.css?{"arguments":[],"import":"Abel","path":"pages/test.tsx","variableName":"firaCode"}'; | ||
import inter from '@next/font/google/target.css?{"arguments":[],"import":"Inter","path":"pages/test.tsx","variableName":"inter"}'; | ||
import firaCode from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Abel","arguments":[],"variableName":"firaCode"}'; | ||
import inter from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Inter","arguments":[],"variableName":"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/target.css?{"arguments":[{"fallback":["system-ui",{"key":false},[]],"key":{"key2":{}},"preload":true,"variant":"400"}],"import":"Fira_Code","path":"pages/test.tsx","variableName":"firaCode"}'; | ||
import firaCode from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Fira_Code","arguments":[{"variant":"400","fallback":["system-ui",{"key":false},[]],"preload":true,"key":{"key2":{}}}],"variableName":"firaCode"}'; | ||
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/target.css?{"arguments":[{"variant":"400"}],"import":"Acme","path":"pages/test.tsx","variableName":"acme1"}'; | ||
import acme1 from 'cool-fonts/target.css?{"path":"pages/test.tsx","import":"Acme","arguments":[{"variant":"400"}],"variableName":"acme1"}'; | ||
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/target.css?{"arguments":["test",[1.0],{"a":2.0},3.0],"import":"Geo","path":"pages/test.tsx","variableName":"geo"}'; | ||
import geo from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Geo","arguments":["test",[1.0],{"a":2.0},3.0],"variableName":"geo"}'; |
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/target.css?{"arguments":[{"display":"swap","variant":"900"}],"import":"Inter","path":"pages/test.tsx","variableName":"inter"}'; | ||
import inter from '@next/font/google/target.css?{"arguments":[{"display":"swap","variant":"900"}],"import":"Inter","path":"pages/test.tsx","variableName":"inter"}'; | ||
import inter from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Inter","arguments":[{"variant":"900","display":"swap"}],"variableName":"inter"}'; | ||
import inter from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Inter","arguments":[{"variant":"900","display":"swap"}],"variableName":"inter"}'; | ||
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/target.css?{"arguments":[{"variant":"900"}],"import":"Inter","path":"pages/test.tsx","variableName":"inter"}'; | ||
import fira from 'cool-fonts/target.css?{"arguments":[{"display":"swap","variant":"400"}],"import":"Fira_Code","path":"pages/test.tsx","variableName":"fira"}'; | ||
import inter from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Inter","arguments":[{"variant":"900"}],"variableName":"inter"}'; | ||
import fira from 'cool-fonts/target.css?{"path":"pages/test.tsx","import":"Fira_Code","arguments":[{"variant":"400","display":"swap"}],"variableName":"fira"}'; | ||
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/target.css?{"arguments":[{"fallback":["system-ui"],"variant":"400"}],"import":"Fira_Code","path":"pages/test.tsx","variableName":"firaCode"}'; | ||
import inter from '@next/font/google/target.css?{"arguments":[{"display":"swap","variant":"900"}],"import":"Inter","path":"pages/test.tsx","variableName":"inter"}'; | ||
import firaCode from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Fira_Code","arguments":[{"variant":"400","fallback":["system-ui"]}],"variableName":"firaCode"}'; | ||
import inter from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Inter","arguments":[{"variant":"900","display":"swap"}],"variableName":"inter"}'; | ||
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/target.css?{"arguments":[{"variant":"900"}],"import":"Inter","path":"pages/test.tsx","variableName":"inter"}'; | ||
import fira from '@next/font/google/target.css?{"arguments":[{"display":"swap","variant":"400"}],"import":"Fira_Code","path":"pages/test.tsx","variableName":"fira"}'; | ||
import inter from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Inter","arguments":[{"variant":"900"}],"variableName":"inter"}'; | ||
import fira from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Fira_Code","arguments":[{"variant":"400","display":"swap"}],"variableName":"fira"}'; | ||
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/target.css?{"arguments":[],"import":"Fira_Code","path":"pages/test.tsx","variableName":"fira"}'; | ||
import fira from '@next/font/google/target.css?{"path":"pages/test.tsx","import":"Fira_Code","arguments":[],"variableName":"fira"}'; |
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 |
---|---|---|
|
@@ -16,8 +16,8 @@ PlainIssue { | |
column: 5, | ||
}, | ||
end: SourcePos { | ||
line: 3, | ||
column: 35, | ||
line: 4, | ||
column: 0, | ||
}, | ||
}, | ||
), | ||
|
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 |
---|---|---|
|
@@ -16,8 +16,8 @@ PlainIssue { | |
column: 3, | ||
}, | ||
end: SourcePos { | ||
line: 13, | ||
column: 19, | ||
line: 14, | ||
column: 0, | ||
}, | ||
}, | ||
), | ||
|
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 |
---|---|---|
|
@@ -16,8 +16,8 @@ PlainIssue { | |
column: 3, | ||
}, | ||
end: SourcePos { | ||
line: 5, | ||
column: 19, | ||
line: 6, | ||
column: 0, | ||
}, | ||
}, | ||
), | ||
|
4 changes: 2 additions & 2 deletions
4
...es/next-swc/crates/next-transform-dynamic/tests/errors/too-many-arguments/output-turbo.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 dynamic from 'next/dynamic'; | ||
const DynamicComponentWithCustomLoading = dynamic(()=>import('../components/hello'), { | ||
loading: ()=><p >...</p> | ||
}, "3rd"); | ||
loading: ()=><p>...</p> | ||
}, '3rd'); |
4 changes: 2 additions & 2 deletions
4
.../next-swc/crates/next-transform-dynamic/tests/errors/too-many-arguments/output-webpack.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 dynamic from 'next/dynamic'; | ||
const DynamicComponentWithCustomLoading = dynamic(()=>import('../components/hello'), { | ||
loading: ()=><p >...</p> | ||
}, "3rd"); | ||
loading: ()=><p>...</p> | ||
}, '3rd'); |
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
...xt-transform-strip-page-exports/tests/errors/server-side-after-static-props/output.stderr
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,7 +1,7 @@ | ||
|
||
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps | ||
,-[input.js:1:1] | ||
1 | export const getStaticProps = async () => {}; | ||
2 | export { a as getServerSideProps }; | ||
1 | export const getStaticProps = async () => {} | ||
2 | export { a as getServerSideProps } | ||
: ^^^^^^^^^^^^^^^^^^ | ||
`---- |
4 changes: 2 additions & 2 deletions
4
...xt-transform-strip-page-exports/tests/errors/static-paths-after-server-side/output.stderr
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,7 +1,7 @@ | ||
|
||
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps | ||
,-[input.js:1:1] | ||
1 | export { a as getServerSideProps } from "./input"; | ||
2 | export { getStaticPaths } from "a"; | ||
1 | export { a as getServerSideProps } from './input' | ||
2 | export { getStaticPaths } from 'a' | ||
: ^^^^^^^^^^^^^^ | ||
`---- |
2 changes: 1 addition & 1 deletion
2
...xt-transform-strip-page-exports/tests/errors/static-props-after-server-side/output.stderr
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,6 +1,6 @@ | ||
|
||
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps | ||
,-[input.js:1:1] | ||
1 | export { getStaticProps, getServerSideProps }; | ||
1 | export { getStaticProps, getServerSideProps } | ||
: ^^^^^^^^^^^^^^^^^^ | ||
`---- |
12 changes: 6 additions & 6 deletions
12
...e-exports/tests/fixtures/getServerSideProps/destructuring-assignment-array/output-data.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,10 +1,10 @@ | ||
import fs from "fs"; | ||
import other from "other"; | ||
import fs from 'fs'; | ||
import other from 'other'; | ||
const [a, b, ...rest] = fs.promises; | ||
const [foo, bar] = other; | ||
export async function getServerSideProps() { | ||
a; | ||
b; | ||
rest; | ||
bar; | ||
a; | ||
b; | ||
rest; | ||
bar; | ||
} |
4 changes: 2 additions & 2 deletions
4
...xports/tests/fixtures/getServerSideProps/destructuring-assignment-array/output-default.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,6 +1,6 @@ | ||
import other from "other"; | ||
import other from 'other'; | ||
const [foo] = other; | ||
export var __N_SSP = true; | ||
export default function Home() { | ||
return __jsx("div", null); | ||
return __jsx("div", null); | ||
} |
12 changes: 6 additions & 6 deletions
12
...-exports/tests/fixtures/getStaticProps/destructuring-assignment-array-expr/output-data.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,10 +1,10 @@ | ||
import fs from "fs"; | ||
import other from "other"; | ||
import fs from 'fs'; | ||
import other from 'other'; | ||
const [a, b, ...rest] = fs.promises; | ||
const [foo, bar] = other; | ||
export async function getStaticProps() { | ||
a; | ||
b; | ||
rest; | ||
bar; | ||
a; | ||
b; | ||
rest; | ||
bar; | ||
} |
4 changes: 2 additions & 2 deletions
4
...ports/tests/fixtures/getStaticProps/destructuring-assignment-array-expr/output-default.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,6 +1,6 @@ | ||
import other from "other"; | ||
import other from 'other'; | ||
const [foo] = other; | ||
export var __N_SSG = true; | ||
export default function Home() { | ||
return __jsx("div", null); | ||
return __jsx("div", null); | ||
} |
12 changes: 6 additions & 6 deletions
12
...-page-exports/tests/fixtures/getStaticProps/destructuring-assignment-array/output-data.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,12 +1,12 @@ | ||
import fs from "fs"; | ||
import other from "other"; | ||
import fs from 'fs'; | ||
import other from 'other'; | ||
let a, b, rest; | ||
[a, b, ...rest] = fs.promises; | ||
let foo, bar; | ||
[foo, bar] = other; | ||
export async function getStaticProps() { | ||
a; | ||
b; | ||
rest; | ||
bar; | ||
a; | ||
b; | ||
rest; | ||
bar; | ||
} |
4 changes: 2 additions & 2 deletions
4
...ge-exports/tests/fixtures/getStaticProps/destructuring-assignment-array/output-default.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,7 +1,7 @@ | ||
import other from "other"; | ||
import other from 'other'; | ||
let foo; | ||
[foo] = other; | ||
export var __N_SSG = true; | ||
export default function Home() { | ||
return __jsx("div", null); | ||
return __jsx("div", null); | ||
} |
20 changes: 10 additions & 10 deletions
20
...page-exports/tests/fixtures/getStaticProps/destructuring-assignment-object/output-data.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,12 +1,12 @@ | ||
import fs from "fs"; | ||
import other from "other"; | ||
const { readFile, readdir, access: foo } = fs.promises; | ||
const { a, b, cat: bar, ...rem } = other; | ||
import fs from 'fs'; | ||
import other from 'other'; | ||
const { readFile , readdir , access: foo } = fs.promises; | ||
const { a , b , cat: bar , ...rem } = other; | ||
export async function getStaticProps() { | ||
readFile; | ||
readdir; | ||
foo; | ||
b; | ||
cat; | ||
rem; | ||
readFile; | ||
readdir; | ||
foo; | ||
b; | ||
cat; | ||
rem; | ||
} |
6 changes: 3 additions & 3 deletions
6
...e-exports/tests/fixtures/getStaticProps/destructuring-assignment-object/output-default.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,6 +1,6 @@ | ||
import other from "other"; | ||
const { a, cat: bar } = other; | ||
import other from 'other'; | ||
const { a , cat: bar } = other; | ||
export var __N_SSG = true; | ||
export default function Home() { | ||
return __jsx("div", null); | ||
return __jsx("div", null); | ||
} |
8 changes: 4 additions & 4 deletions
8
...ext-transform-strip-page-exports/tests/fixtures/getStaticProps/issue-30091/output-data.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,6 +1,6 @@ | ||
export async function getStaticProps() { | ||
await import("_http_common").then((http) => console.log(http)); | ||
return { | ||
props: {}, | ||
}; | ||
await import('_http_common').then((http)=>console.log(http)); | ||
return { | ||
props: {} | ||
}; | ||
} |
20 changes: 10 additions & 10 deletions
20
...sform-strip-page-exports/tests/fixtures/getStaticProps/not-mix-up-bindings/output-data.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,14 +1,14 @@ | ||
function Function1() { | ||
return { | ||
a: function bug(a) { | ||
return 2; | ||
}, | ||
}; | ||
return { | ||
a: function bug(a) { | ||
return 2; | ||
} | ||
}; | ||
} | ||
function Function2() { | ||
var bug = 1; | ||
return { | ||
bug, | ||
}; | ||
var bug = 1; | ||
return { | ||
bug | ||
}; | ||
} | ||
export { getStaticProps } from "a"; | ||
export { getStaticProps } from 'a'; |
10 changes: 4 additions & 6 deletions
10
...ports/tests/fixtures/getStaticProps/not-remove-import-used-in-other-export/output-data.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,10 +1,8 @@ | ||
import { foo, bar } from "thing"; | ||
|
||
import { foo, bar } from 'thing'; | ||
export function otherExport() { | ||
foo; | ||
bar; | ||
foo; | ||
bar; | ||
} | ||
|
||
export async function getStaticProps() { | ||
bar; | ||
bar; | ||
} |
12 changes: 5 additions & 7 deletions
12
...ts/tests/fixtures/getStaticProps/not-remove-import-used-in-other-export/output-default.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,12 +1,10 @@ | ||
import { foo, bar } from "thing"; | ||
|
||
import { foo, bar } from 'thing'; | ||
export var __N_SSG = true; | ||
export default function Home() { | ||
foo; | ||
return __jsx("div", null); | ||
foo; | ||
return __jsx("div", null); | ||
} | ||
|
||
export function otherExport() { | ||
foo; | ||
bar; | ||
foo; | ||
bar; | ||
} |
Oops, something went wrong.