Skip to content

Commit

Permalink
feat(create-analog): add support for Vite 5.1 to template apps (#925)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts committed Mar 8, 2024
1 parent 789fa06 commit 8c6d45f
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/content/src/lib/content-files-token.ts
Expand Up @@ -25,7 +25,7 @@ export const CONTENT_FILES_TOKEN = new InjectionToken<

const newFilename = lookup[filename];
if (newFilename !== undefined) {
objectUsingSlugAttribute[newFilename] = value;
objectUsingSlugAttribute[newFilename] = value as () => Promise<string>;
}
});

Expand Down
3 changes: 2 additions & 1 deletion packages/content/src/lib/get-content-files.ts
Expand Up @@ -22,5 +22,6 @@ export const getContentFilesList = () =>
*/
export const getContentFiles = () =>
import.meta.glob(['/src/content/**/*.md', '/src/content/**/*.agx'], {
as: 'raw',
query: '?raw',
import: 'default',
});
2 changes: 1 addition & 1 deletion packages/create-analog/template-angular-v17/package.json
Expand Up @@ -45,7 +45,7 @@
"nx": "~18.0.0",
"jsdom": "^22.1.0",
"typescript": "~5.3.0",
"vite": "~5.0.0",
"vite": "^5.0.0",
"vitest": "^1.3.1"
}
}
Expand Up @@ -2,7 +2,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": false,
"outDir": "./out-tsc/app",
"types": []
},
Expand Down
6 changes: 1 addition & 5 deletions packages/create-analog/template-angular-v17/tsconfig.json
Expand Up @@ -27,9 +27,5 @@
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
},
"references": [
{ "path": "tsconfig.app.json" },
{ "path": "tsconfig.spec.json" }
]
}
}
Expand Up @@ -2,7 +2,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": false,
"outDir": "./out-tsc/spec",
"target": "es2016",
"types": ["node", "vitest/globals"]
Expand Down
2 changes: 1 addition & 1 deletion packages/create-analog/template-blog/package.json
Expand Up @@ -45,7 +45,7 @@
"nx": "~18.0.0",
"jsdom": "^22.1.0",
"typescript": "~5.3.0",
"vite": "~5.0.0",
"vite": "^5.0.0",
"vitest": "^1.3.1"
}
}
1 change: 0 additions & 1 deletion packages/create-analog/template-blog/tsconfig.app.json
Expand Up @@ -2,7 +2,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": false,
"outDir": "./out-tsc/app",
"types": []
},
Expand Down
6 changes: 1 addition & 5 deletions packages/create-analog/template-blog/tsconfig.json
Expand Up @@ -27,9 +27,5 @@
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
},
"references": [
{ "path": "tsconfig.app.json" },
{ "path": "tsconfig.spec.json" }
]
}
}
1 change: 0 additions & 1 deletion packages/create-analog/template-blog/tsconfig.spec.json
Expand Up @@ -2,7 +2,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": false,
"outDir": "./out-tsc/spec",
"target": "es2016",
"types": ["node", "vitest/globals"]
Expand Down
2 changes: 1 addition & 1 deletion packages/router/src/lib/routes.ts
Expand Up @@ -17,7 +17,7 @@ const FILES = import.meta.glob<RouteExport>([

const CONTENT_FILES = import.meta.glob<string>(
['/src/app/routes/**/*.md', '/src/app/pages/**/*.md'],
{ as: 'raw' }
{ query: '?raw', import: 'default' }
);

export type Files = Record<string, () => Promise<RouteExport | string>>;
Expand Down

0 comments on commit 8c6d45f

Please sign in to comment.