mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-17 13:22:29 +00:00
add custom spa solution
This commit is contained in:
parent
59109a8c1d
commit
3a29f4c86e
4 changed files with 138 additions and 6 deletions
quartz
|
@ -71,6 +71,10 @@ yargs(hideBin(process.argv))
|
|||
setup(build) {
|
||||
build.onLoad({ filter: /\.inline\.(ts|js)$/ }, async (args) => {
|
||||
let text = await promises.readFile(args.path, 'utf8')
|
||||
// remove default exports that we manually inserted
|
||||
text = text.replace('export default', '')
|
||||
text = text.replace('export', '')
|
||||
|
||||
const transpiled = await esbuild.build({
|
||||
stdin: {
|
||||
contents: text,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue