jaredLunde / jaredLunde/snowpack-plugin-mdx

not working with snowpack 3

Open
#12 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
9
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Hello! This lib seems to be not working with snowpack 3.3.7. I am getting this error:

```
Error [ERR_REQUIRE_ESM]: require() of ES Module
node_modules/@mdx-js/mdx/index.js
from
node_modules/snowpack-plugin-mdx/dist/main/index.js
not supported.
Instead change the require of
node_modules/@mdx-js/mdx/index.js
in
node_modules/snowpack-plugin-mdx/dist/main/index.js
to a dynamic import() which is available in all CommonJS modules.
```

I guess snowpack does not like the commonJS style import...
Is there any workaround?

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with Snowpack 3.3.7 and inspect the plugin entry point involved in the reported stack trace, node_modules/snowpack-plugin-mdx/dist/main/index.js. Compare how it loads @mdx-js/mdx and verify the plugin can process MDX without ERR_REQUIRE_ESM; the issue does not name a repository source file or test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.