Skip to content

Commit 69a6619

Browse files
authored
Update getting-started.mdx
1 parent 715b2ba commit 69a6619

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/content/guides/getting-started.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ document.body.appendChild(component());
9898
</html>
9999
```
100100

101-
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.
101+
We also need to adjust our `package.json` file with the following changes:
102+
- Mark out package as `private` and remove the `main` entry. This is to prevent an accidental publish of your code.
103+
- 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.
102104

103105
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).
104106

@@ -117,6 +119,7 @@ T> If you want to learn more about the inner workings of `package.json`, then we
117119
"keywords": [],
118120
"author": "",
119121
"license": "MIT",
122+
- "type": "commonjs",
120123
"devDependencies": {
121124
"webpack": "^5.38.1",
122125
"webpack-cli": "^4.7.2"

0 commit comments

Comments
 (0)