Skip to content

ESM Version of theme-preval.js is actually CommonJS #2148

Closed
@dgreif

Description

@dgreif

Describe the bug

PRC is currently built with exports for both commonjs and esm, with the esm version located in lib-esm. Unfortuantely the theme-preval.js file included in lib-esm is still using commonjs export syntax, which causes it to break environments that only understand ESM.

To Reproduce
Steps to reproduce the behavior:

  1. Run npm run build
  2. Observe the lib-esm/theme-preval.js file has commonjs exports like the following:
module.exports = {
  "theme": {
    // theme output here
  }
}

Expected behavior
The build should output an esm compatible version of theme-preval.js with a named export

export const theme = {
  // theme output here
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions