-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!:
mdc.config.js
support, improve shiki bundle (#129)
- Loading branch information
Showing
35 changed files
with
1,526 additions
and
853 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { defineBuildConfig } from 'unbuild' | ||
import fs from 'fs' | ||
|
||
export default defineBuildConfig({ | ||
entries: [ | ||
'src/config.ts', | ||
], | ||
hooks: { | ||
'rollup:done': () => { | ||
fs.writeFileSync('dist/config.cjs', 'module.exports = {}; module.exports.defineConfig = configs => configs', 'utf-8') | ||
} | ||
}, | ||
externals: [ | ||
'hast' | ||
] | ||
}) |
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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { fileURLToPath } from 'url' | ||
|
||
export default defineNuxtConfig({ | ||
typescript: { | ||
tsConfig: { | ||
compilerOptions: { | ||
paths: { | ||
'@nuxtjs/mdc/config': [ | ||
fileURLToPath(new URL('./src/config.ts', import.meta.url)) | ||
], | ||
} | ||
} | ||
} | ||
} | ||
}) |
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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { defineConfig } from '@nuxtjs/mdc/config' | ||
|
||
export default defineConfig({ | ||
}) | ||
|
||
console.log('Hello from playground/mdc.config.ts') |
Oops, something went wrong.