Skip to content

Commit

Permalink
fix: use strictRequires: true (#8958)
Browse files Browse the repository at this point in the history
fixes #8891
  • Loading branch information
Rich-Harris authored Feb 9, 2023
1 parent 49d2ec6 commit 475ae48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/good-carrots-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-node': patch
---

fix: use `strictRequires: true` when bundling output
2 changes: 1 addition & 1 deletion packages/adapter-node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function (opts = {}) {
// dependencies could have deep exports, so we need a regex
...Object.keys(pkg.dependencies || {}).map((d) => new RegExp(`^${d}(\\/.*)?$`))
],
plugins: [nodeResolve({ preferBuiltins: true }), commonjs(), json()]
plugins: [nodeResolve({ preferBuiltins: true }), commonjs({ strictRequires: true }), json()]
});

await bundle.write({
Expand Down

0 comments on commit 475ae48

Please sign in to comment.