From 69a6619bc9c83c784c169a58c3c6742089c81afe Mon Sep 17 00:00:00 2001 From: prasadcm Date: Mon, 24 Feb 2025 19:43:23 +0530 Subject: [PATCH 1/2] Update getting-started.mdx --- src/content/guides/getting-started.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/content/guides/getting-started.mdx b/src/content/guides/getting-started.mdx index 5f0d559f1a1d..8bd76e32e507 100644 --- a/src/content/guides/getting-started.mdx +++ b/src/content/guides/getting-started.mdx @@ -98,7 +98,9 @@ document.body.appendChild(component()); ``` -We also need to adjust our `package.json` file in order to make sure we mark our package as `private`, as well as removing the `main` entry. This is to prevent an accidental publish of your code. +We also need to adjust our `package.json` file with the following changes: +- Mark out package as `private` and remove the `main` entry. This is to prevent an accidental publish of your code. +- Remove the `type` entry. The latest version of npm sets this by default to commonjs. This will throw error when we use `import` in js files. T> If you want to learn more about the inner workings of `package.json`, then we recommend reading the [npm documentation](https://docs.npmjs.com/files/package.json). @@ -117,6 +119,7 @@ T> If you want to learn more about the inner workings of `package.json`, then we "keywords": [], "author": "", "license": "MIT", +- "type": "commonjs", "devDependencies": { "webpack": "^5.38.1", "webpack-cli": "^4.7.2" From e6578cf344c8e1ca10482f144e4ef0439554b2f1 Mon Sep 17 00:00:00 2001 From: prasadcm Date: Mon, 24 Feb 2025 20:18:31 +0530 Subject: [PATCH 2/2] Update getting-started.mdx Fixed lint error --- src/content/guides/getting-started.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/content/guides/getting-started.mdx b/src/content/guides/getting-started.mdx index 8bd76e32e507..cd403b78509c 100644 --- a/src/content/guides/getting-started.mdx +++ b/src/content/guides/getting-started.mdx @@ -99,6 +99,7 @@ document.body.appendChild(component()); ``` We also need to adjust our `package.json` file with the following changes: + - Mark out package as `private` and remove the `main` entry. This is to prevent an accidental publish of your code. - Remove the `type` entry. The latest version of npm sets this by default to commonjs. This will throw error when we use `import` in js files.