fix: update import paths and jsconfig path aliases
- Update `authCatchAll` and `adminCatchAll` imports to use `@zen/core/features/` prefix instead of `@zen/core/` - Replace generic `@*` path alias with specific aliases for `@styles/*` and `@components/*` in jsconfig.json
This commit is contained in:
+3
-3
@@ -36,7 +36,7 @@ export default function Redirect() {
|
|||||||
redirect('/auth/login/');
|
redirect('/auth/login/');
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
authCatchAll: `export { default } from '@zen/core/auth/page';
|
authCatchAll: `export { default } from '@zen/core/features/auth/page';
|
||||||
`,
|
`,
|
||||||
adminRedirect: `import { redirect } from 'next/navigation';
|
adminRedirect: `import { redirect } from 'next/navigation';
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ export default function Redirect() {
|
|||||||
redirect('/admin/dashboard');
|
redirect('/admin/dashboard');
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
adminCatchAll: `export { default } from '@zen/core/admin/page';
|
adminCatchAll: `export { default } from '@zen/core/features/admin/page';
|
||||||
`,
|
`,
|
||||||
zenApiRoute: `export { GET, POST, PUT, DELETE, PATCH } from '@zen/core/zen/api';
|
zenApiRoute: `export { GET, POST, PUT, DELETE, PATCH } from '@zen/core/zen/api';
|
||||||
`,
|
`,
|
||||||
@@ -83,7 +83,7 @@ async function initProject() {
|
|||||||
done('Cleaned default /app directory');
|
done('Cleaned default /app directory');
|
||||||
|
|
||||||
fs.writeJsonSync('./jsconfig.json', {
|
fs.writeJsonSync('./jsconfig.json', {
|
||||||
compilerOptions: { paths: { '@*': ['./*'] } },
|
compilerOptions: { paths: { '@styles/*': ['./styles/*'], '@components/*': ['./components/*'] } },
|
||||||
}, { spaces: 2 });
|
}, { spaces: 2 });
|
||||||
done('Configured path aliases');
|
done('Configured path aliases');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user