davidtheclark / davidtheclark/babel-plugin-transform-syntax-highlight

Next.js build error

Open
#1 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Description

When running a Next.js build, webpack crashes with a syntax error: `Module "highlight" is not in scope`.

The file has this import at the top:

```js
import highlight from 'babel-plugin-transform-syntax-highlight/highlight'
```

Just guessing, but does this plugin not remove the fake import, causing webpack to stumble when it attempts to bundle it?

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the Next.js webpack build using the import shown in the issue, then inspect how the Babel plugin handles that import during compilation. Done means the build completes without the “Module "highlight" is not in scope” syntax error.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, javascript, next.js, webpack
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.