CommonJS breakage: many consumers still use dedent = require("dedent") #39
Labels
status: accepting prs
Please, send a pull request to resolve this!
type: bug
Something isn't working :(
In the (old) current version 0.7.0,
dedent
is published with adist/dedent.js
that setsmodule.exports
to thededent
function:That's meant to be used with older-style Node.js code like:
However, in e13e334, the style was switched over to ES modules style
default
export:This is a breaking change that just hasn't been published yet. Per this Sourcegraph query for
const dedent = require("dedent")
, many users are still using the old style API.Since I'm trying to keep this package stable (#36), I'm going to use https://www.npmjs.com/package/babel-plugin-add-module-exports to dial back the breaking change. That way folks can import both with the old
const dedent = require("dedent")
and the newimport dedent from "dedent"
ways.The text was updated successfully, but these errors were encountered: