update to Rollup 3
This commit is contained in:
parent
9b78e1687e
commit
c9f7dcdbbd
@ -38,13 +38,13 @@
|
||||
"homepage": "https://conduitry.dev/defiler",
|
||||
"devDependencies": {
|
||||
"@types/node": "=12",
|
||||
"rollup": "^2",
|
||||
"rollup": "^3",
|
||||
"rollup-plugin-cheap-ts": "Conduitry/rollup-plugin-cheap-ts#semver:^1",
|
||||
"typescript": "^4"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"dev": "rollup -cw",
|
||||
"build": "rollup -c --bundleConfigAsCjs",
|
||||
"dev": "rollup -cw --bundleConfigAsCjs",
|
||||
"prepare": "npm run build"
|
||||
}
|
||||
}
|
||||
|
@ -2,10 +2,21 @@ import cheap_ts from 'rollup-plugin-cheap-ts';
|
||||
|
||||
export default {
|
||||
input: './src/index',
|
||||
external: name => /^[a-z]/.test(name),
|
||||
external: (name) => /^[a-z]/.test(name),
|
||||
plugins: [cheap_ts()],
|
||||
output: [
|
||||
{ file: './dist/index.cjs', format: 'cjs', sourcemap: true, interop: false, preferConst: true },
|
||||
{ file: './dist/index.mjs', format: 'esm', sourcemap: true, preferConst: true },
|
||||
{
|
||||
file: './dist/index.cjs',
|
||||
format: 'cjs',
|
||||
sourcemap: true,
|
||||
interop: 'esModule',
|
||||
generatedCode: { constBindings: true },
|
||||
},
|
||||
{
|
||||
file: './dist/index.mjs',
|
||||
format: 'esm',
|
||||
sourcemap: true,
|
||||
generatedCode: { constBindings: true },
|
||||
},
|
||||
],
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user