Skip to content

Commit

Permalink
fix: upgrade ts, optional lowlight
Browse files Browse the repository at this point in the history
  • Loading branch information
modbender authored and modbender committed Dec 13, 2023
1 parent b9dfd00 commit 2f5f259
Show file tree
Hide file tree
Showing 3 changed files with 333 additions and 96 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
"@nuxt/module-builder": "^0.5.4",
"@nuxt/schema": "^3.8.2",
"@nuxt/test-utils": "^3.8.1",
"@types/node": "^20.9.3",
"@types/node": "^20.10.4",
"changelogen": "^0.5.5",
"eslint": "^8.54.0",
"eslint": "^8.55.0",
"nuxt": "^3.8.2",
"vitest": "^0.33.0"
"vitest": "^1.0.4"
}
}
4 changes: 2 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ export default defineNuxtModule<ModuleOptions>({

if (options.lowlight !== false) {
optionalImports = [...optionalImports, ...allImports.lowlightImports];
const lldefaultTheme = options.lowlight.theme || "github-dark";
const lldefaultTheme = options.lowlight?.theme || "github-dark";
const highlightJSVersion =
options.lowlight.highlightJSVersion || "11.9.0";
options.lowlight?.highlightJSVersion || "11.9.0";
const llThemeCSS = `https://unpkg.com/@highlightjs/cdn-assets@${highlightJSVersion}/styles/${lldefaultTheme}.min.css`;

nuxt.options.app.head.link = [
Expand Down
Loading

0 comments on commit 2f5f259

Please sign in to comment.