-
Notifications
You must be signed in to change notification settings - Fork 0
Support default imports (import X from 'module') #975
Copy link
Copy link
Open
Description
Floe currently only supports named imports (import { X } from 'module'). Default imports (import X from 'module') are not supported.
This works fine for frontend code because bundlers (Vite, webpack) automatically resolve named imports from default exports via interop. But without a bundler (Node.js, Deno, CLI tools), import { X } from 'module' fails if the package only has a default export.
Proposed syntax
import trusted Markdown from "react-markdown"
import MyLib from "my-lib"
When this matters
- Server-side Node.js/Deno code
- CLI tools compiled with Floe
- Any non-bundled environment
Not urgent
Frontend with Vite covers the current use case. Track for when Floe targets backend.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels