dedent icon indicating copy to clipboard operation
dedent copied to clipboard

ES Module

Open bennypowers opened this issue 5 years ago • 2 comments

Please publish as an ES Module.

If users need CJS, it could be compiled from the standard javascript.

bennypowers avatar Nov 05 '18 19:11 bennypowers

should be possible by making a custom babel config with modules: false in the transform; and then outputting to a separate file in dist. Do you want to contribute?

Haroenv avatar Nov 06 '18 08:11 Haroenv

Or ... you could switch the flow type annotations in your source code to use comment style, so your source file itself is a valid ES6 module. Then the following import would work in-browser:

import dedent from "./node_modules/dedent/dedent.js"

Happy to do PR for that if considered acceptable.

fineline avatar Mar 22 '19 03:03 fineline