Skip to content

Webpack error with exports->default in package.json #49

@jeff-fillmore

Description

@jeff-fillmore

First off, thanks for your work on the project!

Got this error when using webpack 5.91.0 on version 1.3.2 of format-css:
Module not found: Error: Default condition should be last one

Version 1.3.1 works when the last exports was default and when I manually update the package.json for format-css so the last exports is default then webpack works.

  "exports": {
    "require": "./dist/format.cjs",
    "types": "./dist/index.d.ts",
    "default": "./dist/format.modern.js"
  },

Webpack documentation

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