From 57b0c170e8fdbbfcc54ce0d7f9c039be67a1e1ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaffee=E2=98=95?= <45464816+0ql@users.noreply.github.com> Date: Sat, 14 Aug 2021 01:31:44 +0200 Subject: [PATCH] change the typescript moduleResolution of all examples to "node" (#1108) * Fixes many Errors related to typescript Fix Svelte Component Errors importing Svelte standard functions using typescript see https://github.com/snowpackjs/astro/issues/403. Also fixes "ReferenceError: exports is not defined" see https://github.com/snowpackjs/astro/issues/969. * change typescript default moduleresolution in examples see #403 --- examples/blog-multiple-authors/tsconfig.json | 3 +++ examples/blog/tsconfig.json | 3 +++ examples/docs/tsconfig.json | 3 +++ examples/framework-lit/tsconfig.json | 3 +++ examples/framework-multiple/tsconfig.json | 3 +++ examples/framework-preact/tsconfig.json | 3 +++ examples/framework-react/tsconfig.json | 3 +++ examples/framework-solid/tsconfig.json | 3 +++ examples/framework-svelte/tsconfig.json | 3 +++ examples/framework-vue/tsconfig.json | 3 +++ examples/portfolio/tsconfig.json | 3 +++ examples/snowpack/tsconfig.json | 3 +++ examples/starter/tsconfig.json | 3 +++ examples/with-markdown-plugins/tsconfig.json | 3 +++ examples/with-markdown/tsconfig.json | 3 +++ examples/with-nanostores/tsconfig.json | 3 +++ examples/with-tailwindcss/tsconfig.json | 3 +++ 17 files changed, 51 insertions(+) create mode 100644 examples/blog-multiple-authors/tsconfig.json create mode 100644 examples/blog/tsconfig.json create mode 100644 examples/docs/tsconfig.json create mode 100644 examples/framework-lit/tsconfig.json create mode 100644 examples/framework-multiple/tsconfig.json create mode 100644 examples/framework-preact/tsconfig.json create mode 100644 examples/framework-react/tsconfig.json create mode 100644 examples/framework-solid/tsconfig.json create mode 100644 examples/framework-svelte/tsconfig.json create mode 100644 examples/framework-vue/tsconfig.json create mode 100644 examples/portfolio/tsconfig.json create mode 100644 examples/snowpack/tsconfig.json create mode 100644 examples/starter/tsconfig.json create mode 100644 examples/with-markdown-plugins/tsconfig.json create mode 100644 examples/with-markdown/tsconfig.json create mode 100644 examples/with-nanostores/tsconfig.json create mode 100644 examples/with-tailwindcss/tsconfig.json diff --git a/examples/blog-multiple-authors/tsconfig.json b/examples/blog-multiple-authors/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/blog-multiple-authors/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/blog/tsconfig.json b/examples/blog/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/blog/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/docs/tsconfig.json b/examples/docs/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/docs/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/framework-lit/tsconfig.json b/examples/framework-lit/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/framework-lit/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/framework-multiple/tsconfig.json b/examples/framework-multiple/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/framework-multiple/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/framework-preact/tsconfig.json b/examples/framework-preact/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/framework-preact/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/framework-react/tsconfig.json b/examples/framework-react/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/framework-react/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/framework-solid/tsconfig.json b/examples/framework-solid/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/framework-solid/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/framework-svelte/tsconfig.json b/examples/framework-svelte/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/framework-svelte/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/framework-vue/tsconfig.json b/examples/framework-vue/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/framework-vue/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/portfolio/tsconfig.json b/examples/portfolio/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/portfolio/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/snowpack/tsconfig.json b/examples/snowpack/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/snowpack/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/starter/tsconfig.json b/examples/starter/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/starter/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/with-markdown-plugins/tsconfig.json b/examples/with-markdown-plugins/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/with-markdown-plugins/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/with-markdown/tsconfig.json b/examples/with-markdown/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/with-markdown/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/with-nanostores/tsconfig.json b/examples/with-nanostores/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/with-nanostores/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file diff --git a/examples/with-tailwindcss/tsconfig.json b/examples/with-tailwindcss/tsconfig.json new file mode 100644 index 0000000000..a384bc3bb0 --- /dev/null +++ b/examples/with-tailwindcss/tsconfig.json @@ -0,0 +1,3 @@ +{ + "moduleResolution": "node" +} \ No newline at end of file