8000 ES Module Format Support · Issue #5735 · formio/formio.js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
ES Module Format Support #5735
Closed
Closed
@manuelroth

Description

@manuelroth

Problem Description
I am using Vite as a bundler. Vite expects ES Module by default. CommonJS Format is automatically transformed to ES Module during development builds. But somehow I can't get it working with formiojs for production builds. It results in exports is not defined Error:
image. I guess this error originates in Vite not being able to convert formiojs from CommonJS to ES Module during production build. Therefore it still contains exports/require after bundling.

Currently formiojs only supports CommonJS as output format. When are gonna support ES Module output format?

Possible Solution
In addition to CommonJS format, also support ES Module format. So Vite could directly use this version instead of having to do the conversion by itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0