Skip to content

import "protobufjs/minimal" doesn't work #2086

@dynst

Description

@dynst

output = util.wrap(output, protobuf.util.merge({ dependency: "protobufjs/minimal" }, options));

pbjs -w es6 will generate an import statement that simply fails, because it's ES6 not CommonJS.

It can't import a file with the extension omitted, it has to import "protobufjs/minimal.js".

Or an "exports" field entry for /minimal needs to be added to protobufjs to make it work.

https://nodejs.org/api/esm.html#import-specifiers

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