Skip to content

Commit

Permalink
fix: compability building
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin committed Oct 2, 2024
1 parent 28eaa6e commit c2414c5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/typst.ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"build:bundle": "yarn build:main && yarn build-template --component=global-compiler && yarn build-template --component=global-renderer && yarn build-template --component=all-in-one && yarn build-template --component=all-in-one-lite",
"build": "node scripts/mkdir.mjs && tsc -p ./tsconfig.lib.json && tsc -p ./tsconfig.cjs.json && node scripts/fix-cjs.mjs && yarn build:bundle",
"build:dev": "node scripts/mkdir.mjs && tsc -p ./tsconfig.lib.json && npx vite build --watch -c vite.config.mjs -- --component=main",
"dev:tsc": "node scripts/mkdir.mjs && tsc -w -p ./tsconfig.lib.json",
"dev:main": "node scripts/mkdir.mjs && npx vite build --watch -c vite.config.mjs -- --component=main",
"prepublish": "turbo build",
"publish:dry": "npm publish --dry-run --access public",
"publish:lib": "npm publish --access public || exit 0"
Expand Down
2 changes: 1 addition & 1 deletion packages/typst.ts/src/dom.mts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function provideDomDoc<TBase extends GConstructor<TypstDocumentContext<In
this.disposeList.push(() => {
this.dispose();
});
this.plugin = this.opts.renderer as TypstRendererDriver;
this.plugin = this.opts.renderer as any as TypstRendererDriver;
if (this.opts.domScale !== undefined) {
if (this.opts.domScale <= 0) {
throw new Error('domScale must be positive');
Expand Down
1 change: 1 addition & 0 deletions packages/typst.ts/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default defineConfig({
lib: {
...lib,
formats: ['es', 'cjs'],
fileName: (f, id) => `${f === 'es' ? 'esm' : 'cjs'}/${id}.bundle.js`,
},
emptyOutDir: false,
rollupOptions: {
Expand Down

0 comments on commit c2414c5

Please sign in to comment.