Skip to content

export map breaks rollup plugin, others trying to import/require ('svelte/package.json') #5659

@FredKSchott

Description

@FredKSchott

Congrats on releasing the new export map! Quick issue spotted: Node.js doesn't default to include the package.json file as part of your package, meaning tooling/consumers can't `require('svelte/package.json'). The Rollup plugin currently does this, as do many others.

Snowpack's Svelte template is broken as a result.

The fix is to add this to your export map:

"exports": {
+    "./package.json": "./package.json"
}

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