Skip to content

Commit

Permalink
fix(script): revert changes did to generate-schema
Browse files Browse the repository at this point in the history
  • Loading branch information
GervinFung committed Sep 23, 2024
1 parent a1373e0 commit f78f02f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions apps/web/script/seo/schema.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import fs from 'fs';

import { generatePaths } from '../../test/snapshot/data';

const main = () => {
const main = async () => {
if (!fs.existsSync('src/web/generated')) {
fs.mkdirSync('src/web/generated');
}
Expand All @@ -13,7 +11,10 @@ const main = () => {
`const paths = [] as ReadonlyArray<string>\n; export default paths;`
);

const paths = generatePaths();
// eslint-disable-next-line import/dynamic-import-chunkname
const paths = await import('../../test/snapshot/data').then((data) => {
return data.generatePaths();
});

fs.writeFileSync(
'src/web/generated/schema.ts',
Expand All @@ -23,4 +24,4 @@ const main = () => {
process.exit(0);
};

main();
void main();

0 comments on commit f78f02f

Please sign in to comment.