diff --git a/.changeset/shaggy-elephants-sell.md b/.changeset/shaggy-elephants-sell.md new file mode 100644 index 000000000000..413eb2252859 --- /dev/null +++ b/.changeset/shaggy-elephants-sell.md @@ -0,0 +1,5 @@ +--- +'create-svelte': patch +--- + +Set target to es2019 in default tsconfig.json diff --git a/packages/create-svelte/template-additions/.eslintrc.cjs b/packages/create-svelte/template-additions/.eslintrc.cjs index b7a10ef8692f..04351afca982 100644 --- a/packages/create-svelte/template-additions/.eslintrc.cjs +++ b/packages/create-svelte/template-additions/.eslintrc.cjs @@ -5,7 +5,7 @@ module.exports = { overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], parserOptions: { sourceType: 'module', - ecmaVersion: 2018 + ecmaVersion: 2019 }, env: { browser: true, diff --git a/packages/create-svelte/template-additions/tsconfig.json b/packages/create-svelte/template-additions/tsconfig.json index 8d501c1d09ae..3f837e370239 100644 --- a/packages/create-svelte/template-additions/tsconfig.json +++ b/packages/create-svelte/template-additions/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "moduleResolution": "node", - "target": "es2018", + "target": "es2019", /** svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript to enforce using \`import type\` instead of \`import\` for Types.