refactor(markdown): Make module CLI-importable
Drop the mermaid import from the markdown module. The extension only emits <pre class="mermaid">, so initialize mermaid in the app entry instead. Use explicit .js specifiers plus a bundler extensionAlias so both the NodeNext CLI build and the web build resolve the sources.
This commit is contained in:
@@ -18,6 +18,13 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
rspack: {
|
||||
resolve: {
|
||||
// Allow TypeScript sources to use explicit `.js` specifiers (required
|
||||
// by the CLI's NodeNext build) while the bundler resolves them to .ts.
|
||||
extensionAlias: {
|
||||
".js": [".ts", ".tsx", ".js"],
|
||||
},
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user