Provide a way to use module script in MDN Playground Javascript code
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 233
- Forks
- 61
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 82
Description
I'd like to use the import keyword in MDN Playground Javascript code but it currently fails with SyntaxError: Cannot use import statement outside a module.
Is there something hidden like js live-sample_example module I could use by any chance?
This is blocking me from updating MDN documentation page. Here's my workaround for now: https://github.com/mdn/content/pull/44981
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the MDN Playground JavaScript execution entry point and compare its current handling with the workaround in mdn/content#44981. Confirm how module scripts are represented, then verify that Playground code can use import without the current syntax error and that existing non-module examples still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100