Skip to content

Commit

Permalink
target Node 12 in app output
Browse files Browse the repository at this point in the history
Without an explicit target value, esbuild will pick up the version from
tsconfig.json, if present. This breaks the build if that specifies a
target of es2019, which does not support import.meta.
  • Loading branch information
Conduitry committed Jun 11, 2021
1 parent 1dffefb commit 1f86253
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/adapter-node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export default function ({ out = 'build' } = {}) {
bundle: true,
external: Object.keys(JSON.parse(readFileSync('package.json', 'utf8')).dependencies || {}),
format: 'esm',
platform: 'node'
platform: 'node',
target: 'node12'
});

utils.log.minor('Prerendering static pages');
Expand Down

0 comments on commit 1f86253

Please sign in to comment.