Skip to content

Commit 881ebb6

Browse files
committed
refactor(demo): migrate to Vite
ditch parcel v1, and replace it with Vite. Vite is much faster and smaller, compared to parcel
1 parent 5fac14f commit 881ebb6

File tree

6 files changed

+11778
-23262
lines changed

6 files changed

+11778
-23262
lines changed

demo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ AVR8js + Monaco Editor. To run this demo:
44

55
1. Install dependencies: `npm install`
66
2. Start the code: `npm start`
7-
3. Go to http://localhost:1234/ and start tinkering
7+
3. Go to http://localhost:3000/ and start tinkering
88

99
The demo is configured to automatically reload the app whenever you change the code.

demo/src/index.html renamed to demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ <h2>AVR8js LED Demo</h2>
2828
</div>
2929
</div>
3030
<script src="//cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.21.2/min/vs/loader.js"></script>
31-
<script src="./index.ts"></script>
31+
<script type="module" src="./src/index.ts"></script>
3232
</body>
3333
</html>

demo/vite.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { join } from 'path';
2+
3+
/**
4+
* @type {import('vite').UserConfig}
5+
*/
6+
const config = {
7+
base: '',
8+
resolve: {
9+
alias: { avr8js: join(__dirname, '../src') },
10+
},
11+
server: {
12+
open: true,
13+
},
14+
};
15+
16+
export default config;

0 commit comments

Comments
 (0)