Skip to content

Commit 7ffa437

Browse files
committed
Fix rollup configuration that failed umd builds in node env
1 parent d6038d1 commit 7ffa437

File tree

2 files changed

+94
-263
lines changed

2 files changed

+94
-263
lines changed

rollup.config.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import nodeResolve from '@rollup/plugin-node-resolve'
33
import { resolve } from 'path'
44
import babel from 'rollup-plugin-babel'
55
import { terser } from 'rollup-plugin-terser'
6-
import typescript from '@rollup/plugin-typescript'
7-
6+
import typescript from 'rollup-plugin-typescript2'
87
import pkg from './package.json'
98

109
function getOutputFileName(fileName, isProd = false) {
@@ -17,8 +16,12 @@ const INPUT = 'src/index.ts'
1716

1817
const PLUGINS = [
1918
typescript({
20-
tsconfig: 'tsconfig.json',
21-
exclude: ['tests', '*.js', 'scripts', '**/__tests__/*.ts'],
19+
useTsconfigDeclarationDir: true,
20+
tsconfigOverride: {
21+
includes: ['src'],
22+
exclude: ['tests', '*.js', 'scripts', '**/__tests__/*.ts'],
23+
esModuleInterop: true,
24+
},
2225
}),
2326
]
2427
module.exports = [

0 commit comments

Comments
 (0)