-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
90 changed files
with
43,977 additions
and
20,794 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import commonjs from '@rollup/plugin-commonjs' | ||
import nodeResolve from '@rollup/plugin-node-resolve' | ||
import typescript from '@rollup/plugin-typescript' | ||
import terser from '@rollup/plugin-terser'; | ||
|
||
|
||
const treeshake = { | ||
moduleSideEffects : false, | ||
propertyReadSideEffects : false, | ||
tryCatchDeoptimization : false | ||
} | ||
|
||
const onwarn = (warning) => { | ||
if ( | ||
warning.code === 'INVALID_ANNOTATION' && | ||
warning.message.includes('@__PURE__') | ||
) { | ||
return | ||
} | ||
throw new Error(warning) | ||
} | ||
|
||
export default { | ||
plugins: [ typescript(), nodeResolve(), commonjs() ], | ||
input: 'ts_src/index.ts', | ||
onwarn, | ||
output: [ | ||
{ | ||
file: 'src/cjs/index.cjs', | ||
format: 'cjs', | ||
sourcemap: true, | ||
}, | ||
{ | ||
file: 'src/esm/index.js', | ||
format: 'es', | ||
sourcemap: true, | ||
minifyInternalExports: false | ||
} | ||
], | ||
strictDeprecations: true, | ||
treeshake | ||
} |
Oops, something went wrong.