Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/content/guides/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ document.body.appendChild(component());
</html>
```

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

Expand All @@ -117,6 +120,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"
Expand Down