-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
💪 phase/solvedPost is donePost is done
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
@mdx-js/esbuild: 2.0.0-rc.2
Link to runnable example
No response
Steps to reproduce
Create the following directory structure:
index.mdx
pages/
page.mdx
data.js
Suppose index.mdx includes import Component from "./pages/page.mdx",
and pape.mdx includes import data from "./data.js".
Then use @mdx-js/esbuild to build:
import esbuild from 'esbuild'
import mdx from '@mdx-js/esbuild'
await esbuild.build({
entryPoints: ['index.mdx'],
outfile: 'output.js',
bundle: true,
format: 'esm',
plugins: [mdx({})]
})Expected behavior
It's expected to bundle them without any error.
Actual behavior
An error occurs:
pages/page.mdx:3:17: error: Could not resolve "./data.js"
3 │ import data from "./data.js";
Runtime
Node v16
Package manager
npm v8
OS
Linux
Build and bundle tools
esbuild
charbelrami and silvenon
Metadata
Metadata
Assignees
Labels
💪 phase/solvedPost is donePost is done