Skip to content

Commit

Permalink
check for this before calling it in rollup plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
nickreese committed May 31, 2022
1 parent e15af8d commit 91a18b9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
15 changes: 12 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"rimraf": "^3.0.2",
"ts-jest": "^26.5.3",
"ts-node": "^9.1.1",
"typescript": "^4.3.5"
"typescript": "^4.7.2"
},
"description": "Elder.js is an opinionated static site generator and web framework built with SEO in mind.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/rollup/rollupPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export function transformFn({
const dependencies = getDependencies(id);
compiled.js.dependencies = [...dependencies, ...processed.dependencies];

if (this.addWatchFile) {
if (this && this.addWatchFile) {
this.addWatchFile(id);
compiled.js.dependencies.map((d) => this.addWatchFile(d));
}
Expand Down

0 comments on commit 91a18b9

Please sign in to comment.