mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-17 14:29:48 +02:00
chore: Refactor build to simplify vite and esbuild
This commit is contained in:
@@ -17,17 +17,12 @@ export default function jsonSchemaPlugin(): PluginOption {
|
||||
}
|
||||
|
||||
const jsonSchema = loadSchema(src, idAsUrl.pathname);
|
||||
if (idAsUrl.searchParams.get('only-defaults')) {
|
||||
return {
|
||||
code: getDefaults(jsonSchema),
|
||||
map: null, // no source map
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
code: getSchema(jsonSchema),
|
||||
map: null, // provide source map if available
|
||||
};
|
||||
}
|
||||
return {
|
||||
code: idAsUrl.searchParams.get('only-defaults')
|
||||
? getDefaults(jsonSchema)
|
||||
: getSchema(jsonSchema),
|
||||
map: null, // no source map
|
||||
};
|
||||
},
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user