From 99e69b4414d86f3b3391d12f516be39753283fd8 Mon Sep 17 00:00:00 2001 From: Rodrigo Pombo Date: Fri, 15 Apr 2022 10:54:53 +0000 Subject: [PATCH 1/2] Rename esm to .mjs --- packages/mdx/package.json | 10 +++++----- packages/mdx/rollup.config.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/mdx/package.json b/packages/mdx/package.json index b5e871aa..acc0c34a 100644 --- a/packages/mdx/package.json +++ b/packages/mdx/package.json @@ -5,16 +5,16 @@ "dist" ], "main": "./dist/index.cjs.js", - "module": "./dist/index.esm.js", + "module": "./dist/index.esm.mjs", "types": "./dist/index.d.ts", "exports": { ".": { - "import": "./dist/index.esm.js", + "import": "./dist/index.esm.mjs", "require": "./dist/index.cjs.js", "style": "./dist/index.css" }, "./components": { - "import": "./dist/components.esm.js", + "import": "./dist/components.esm.mjs", "require": "./dist/components.cjs.js", "default": "./dist/components.cjs.js" }, @@ -23,13 +23,13 @@ "./styles.css": "./dist/index.css", "./dist/index.css": "./dist/index.css", "./dist/components.cjs.js": { - "import": "./dist/components.esm.js", + "import": "./dist/components.esm.mjs", "require": "./dist/components.cjs.js", "default": "./dist/components.cjs.js" } }, "browser": { - "./dist/index.esm.js": "./dist/index.browser.mjs" + "./dist/index.esm.mjs": "./dist/index.browser.mjs" }, "scripts": { "dev": "next", diff --git a/packages/mdx/rollup.config.js b/packages/mdx/rollup.config.js index 81d875d0..6a6b6701 100644 --- a/packages/mdx/rollup.config.js +++ b/packages/mdx/rollup.config.js @@ -34,7 +34,7 @@ export default function makeConfig(commandOptions) { format: "cjs", }, { - file: `./dist/index.esm.js`, + file: `./dist/index.esm.mjs`, format: "es", }, ], @@ -84,7 +84,7 @@ export default function makeConfig(commandOptions) { format: "cjs", }, { - file: `./dist/components.esm.js`, + file: `./dist/components.esm.mjs`, format: "es", }, ], From e6a2f13fcdcaf636d8b97b3f80c11bea677bd211 Mon Sep 17 00:00:00 2001 From: Rodrigo Pombo Date: Fri, 15 Apr 2022 11:33:32 +0000 Subject: [PATCH 2/2] Update demo --- examples/nextjs/pages/my.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/nextjs/pages/my.md b/examples/nextjs/pages/my.md index d71c32e4..8450e8bd 100644 --- a/examples/nextjs/pages/my.md +++ b/examples/nextjs/pages/my.md @@ -2,7 +2,7 @@ Lorem ipsum dolor sit amet. -```python hello.py +```python hello.py mark=1[22:30] print("Rendered with Code Hike") ```