Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drwpow/vite-micromark-repro
https://github.com/drwpow/vite-micromark-repro
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/drwpow/vite-micromark-repro
- Owner: drwpow
- Created: 2021-08-05T23:47:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-05T23:49:35.000Z (over 3 years ago)
- Last Synced: 2024-10-15T00:39:11.116Z (2 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vite + micromark-extension-mdx-expression repro
To reproduce:
1. Clone this repo
2. Run `npm install`
3. Run `npm run build`. You should see the following error:```
Error when evaluating SSR module [...]/server/markdown.mjs:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: [...]/node_modules/micromark/index.js
require() of ES modules is not supported.
require() of [...]/node_modules/micromark/index.js from [...]/node_modules/vite/dist/node/chunks/dep-c1a9de64.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from [...]/node_modules/micromark/package.json.
```