aboutsummaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorUri Shaked2022-05-23 17:46:27 +0300
committerUri Shaked2022-05-23 17:46:27 +0300
commit881ebb6006eeedc799b408c99da2042ec6bc3d87 (patch)
tree1878aa68befd7cd8109a7f1a890afc9db2c8b028 /demo
parent0.19.0 (diff)
downloadavr8js-881ebb6006eeedc799b408c99da2042ec6bc3d87.tar.gz
avr8js-881ebb6006eeedc799b408c99da2042ec6bc3d87.tar.bz2
avr8js-881ebb6006eeedc799b408c99da2042ec6bc3d87.zip
refactor(demo): migrate to Vite
ditch parcel v1, and replace it with Vite. Vite is much faster and smaller, compared to parcel
Diffstat (limited to '')
-rw-r--r--demo/README.md2
-rw-r--r--demo/index.html (renamed from demo/src/index.html)2
-rw-r--r--demo/vite.config.js16
3 files changed, 18 insertions, 2 deletions
diff --git a/demo/README.md b/demo/README.md
index 9be5c19..a8e0b27 100644
--- a/demo/README.md
+++ b/demo/README.md
@@ -4,6 +4,6 @@ AVR8js + Monaco Editor. To run this demo:
1. Install dependencies: `npm install`
2. Start the code: `npm start`
-3. Go to http://localhost:1234/ and start tinkering
+3. Go to http://localhost:3000/ and start tinkering
The demo is configured to automatically reload the app whenever you change the code.
diff --git a/demo/src/index.html b/demo/index.html
index 1467176..1156bd1 100644
--- a/demo/src/index.html
+++ b/demo/index.html
@@ -28,6 +28,6 @@
</div>
</div>
<script src="//cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.21.2/min/vs/loader.js"></script>
- <script src="./index.ts"></script>
+ <script type="module" src="./src/index.ts"></script>
</body>
</html>
diff --git a/demo/vite.config.js b/demo/vite.config.js
new file mode 100644
index 0000000..bf56dfc
--- /dev/null
+++ b/demo/vite.config.js
@@ -0,0 +1,16 @@
+import { join } from 'path';
+
+/**
+ * @type {import('vite').UserConfig}
+ */
+const config = {
+ base: '',
+ resolve: {
+ alias: { avr8js: join(__dirname, '../src') },
+ },
+ server: {
+ open: true,
+ },
+};
+
+export default config;