Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

Output cjs in font package (#506)

Bogdan Chadkin9b0d7f25b204
diff --git a/apps/designer/app/designer/features/props-panel/use-props-logic.test.ts b/apps/designer/app/designer/features/props-panel/use-props-logic.test.ts
index e9103b21c5..2410e67056 100644
--- a/apps/designer/app/designer/features/props-panel/use-props-logic.test.ts
+++ b/apps/designer/app/designer/features/props-panel/use-props-logic.test.ts
@@ -350,7 +350,7 @@ describe("usePropsLogic", () => {
name: "string",
description: "string",
location: "REMOTE",
- createdAt: new Date("1995-12-17T03:24:00"),
+ createdAt: new Date("1995-12-17T03:24:00Z"),
meta: { width: 101, height: 202 },
path: "string",
status: "uploaded",
diff --git a/packages/fonts/package.json b/packages/fonts/package.json
index 4d23b50da6..43652e5f03 100644
--- a/packages/fonts/package.json
+++ b/packages/fonts/package.json
@@ -10,7 +10,8 @@
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"checks": "yarn typecheck && yarn lint && yarn test",
"dev": "tsup --watch",
- "build": "rm -fr lib tsconfig.tsbuildinfo && tsc",
+ "build:cjs": "tsc --module commonjs --outDir lib/cjs && find lib/cjs -name '*.js' | while read NAME; do mv $NAME ${NAME%.js}.cjs; done",
+ "build": "rm -fr lib tsconfig.tsbuildinfo && tsc && yarn build:cjs",
"lint": "eslint ./src --ext .ts,.tsx --max-warnings 0"
},
"dependencies": {
@@ -29,7 +30,10 @@
},
"module": "./lib/index.js",
"exports": {
- ".": "./lib/index.js",
+ ".": {
+ "import": "./lib/index.js",
+ "require": "./lib/cjs/index.cjs"
+ },
"./server": "./server.js"
},
"types": "lib/index.d.ts",