bufbuild / protobuf-es

Protocol Buffers for ECMAScript. The only JavaScript Protobuf library that is fully-compliant with Protobuf conformance tests.
Apache License 2.0
960 stars 55 forks source link

V2: Change default value of plugin option `import_extension` to `none` #832

Closed srikrsna-buf closed 3 weeks ago

srikrsna-buf commented 3 weeks ago

Change default value of import_extension to none from .js.

In v1, we generate code using .js extension which is the spec compliant way (and has been for sometime) of importing js files. Node, TS, and browsers support this but bundlers still haven't caught up with it. Users filed several issues related to this.

With this change, the default will work in most places and where users do need them it can be configured using the import_extension=.js plugin option.

[!IMPORTANT] This change affects all plugins written using protoplugin when they upgrade to v2.