From f5a525613f4fbd92a2b7456b5ef8e7178ebab718 Mon Sep 17 00:00:00 2001 From: Titus Date: Wed, 23 Dec 2020 16:00:17 +0100 Subject: [PATCH] Add back build for runtime (#1412) Related to GH-1271. --- packages/runtime/package.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/runtime/package.json b/packages/runtime/package.json index a12606ceb..ec59d1e0c 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -22,8 +22,12 @@ "engines": { "node": ">=8" }, - "main": "dist/cjs.js", - "module": "dist/esm.js", + "main": "dist/mdx-runtime.js", + "module": "dist/mdx-runtime.es.js", + "exports": { + "import": "./dist/mdx-runtime.modern.js", + "require": "./dist/mdx-runtime.js" + }, "types": "types/index.d.ts", "files": [ "dist", @@ -38,6 +42,7 @@ "mdxast" ], "scripts": { + "build": "microbundle -f modern,es,cjs src/index.js", "test-api": "jest test", "test-coverage": "jest test --coverage", "test-types": "dtslint types", @@ -52,6 +57,7 @@ "buble-jsx-only": "^0.19.8" }, "devDependencies": { + "microbundle": "^0.12.0", "rehype-add-classes": "^1.0.0", "remark-autolink-headings": "^6.0.0", "remark-slug": "^6.0.0"