Skip to content

Commit

Permalink
Specify that es2020 is required (#193)
Browse files Browse the repository at this point in the history
* Specify that `es2020` is required

* Update README.md

* Update README.md

* Add section on vite to `index.html`

* Remove section on bundlers from `README.md`
  • Loading branch information
debater-coder authored Jul 18, 2022
1 parent da809ae commit e0277c4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/cubing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ <h1><a href="#javascript"><code>npm</code> package</a></h1>
The <code>npm</code> package should work with any modern bundlers and tools. If you are having trouble, make sure your tool is compatible with ES2020 syntax. We recommend using <a href="https://esbuild.github.io/"><code>esbuild</code></a> or tools based on <code>esbuild</code>, and you may find <a href="https://github.com/cubing/cubing-app-template">this project template</a> a helpful start.
</p>
</section>
<section id="vite">
<h1>Using with Vite</h1>
<p>
By default, <a href="https://vitejs.dev/">Vite</a>, an <code>esbuild</code>-based bundler, transpiles code to ES2019. To use the <code>npm</code> package with Vite, add this to your <code>vite.config.js</code>:
<code class="sample">
<span>export default {build: {target: "es2020"}}</span>
</code>
</p>
</section>

<section id="code-experiments">
<h1><a href="#code-experiments">Code Experiments</a></h1>
Expand Down

0 comments on commit e0277c4

Please sign in to comment.