Skip to content

Commit 762aeb4

Browse files
committed
fix(templates): add missing rollup-plugin-commonjs package to fix commonjs build
1 parent 01c1d52 commit 762aeb4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

generators/app/templates/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"lint-staged": "^10.0.9",
4242
"prettier": "^2.0.2",
4343
"rollup": "^1.12.3",
44+
"rollup-plugin-commonjs": "^10.1.0",
4445
"rollup-plugin-node-resolve": "^5.0.0",
4546
"rollup-plugin-typescript2": "^0.21.1",
4647
"standard-version": "^6.0.1",

generators/app/templates/rollup.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import resolve from 'rollup-plugin-node-resolve';
2+
import commonjs from 'rollup-plugin-commonjs';
23
import typescript from 'rollup-plugin-typescript2';
34

45
import pkg from './package.json';
@@ -8,7 +9,14 @@ const getConfig = (inputFile) => ({
89
...Object.keys(pkg.dependencies || {}),
910
...Object.keys(pkg.peerDependencies || {}),
1011
],
11-
plugins: [resolve(), typescript({ useTsconfigDeclarationDir: true })],
12+
plugins: [
13+
resolve(),
14+
commonjs(),
15+
typescript({
16+
useTsconfigDeclarationDir: true,
17+
rollupCommonJSResolveHack: true,
18+
}),
19+
],
1220
input: inputFile,
1321
output: [
1422
{

0 commit comments

Comments
 (0)