rollup-plugin-export-equals
Transforms export default something
to export = something
for CommonJS module type declaration export.
For most applications you won't need this plugin, but it is specially useful after
rollup-plugin-dts
orrolloup-plugin-typescript2
(maybe others...) if your want to build a CommonJS module.
Install
npm i -D rollup-plugin-export-equals
Usage
rollup-plugin-dts@0.x.x
with // rollup.config.js;; input: "src/index.ts" output: file: "index.d.ts" format: "es" plugins:
rollup-plugin-dts@1.x.x
with // rollup.config.js;; input: "input/index.d.ts" output: file: "out/index.d.ts" format: "es" plugins:
rollup-plugin-typescript2
with // rollup.config.js;; input: "src/index.ts" output: file: "dist/index.js" format: "cjs" plugins:
Options
file
file: string;
Path to the file which content to be replaced. If provided the plugin will transform the file in-place instead of the bundled output. It will process the file after it has been writen to disk. For example after rollup-plugin-typescript2
has written it to disk.
replace
replace: string;replace:string;default: "export = $1"
String or function to be passed to code.replace
function. $1
refers to the original value captured from export default ...
.