Skip to content

Commit

Permalink
chore: update playground
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Sep 8, 2024
1 parent 6ae09fe commit bbbfb88
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 79 deletions.
10 changes: 9 additions & 1 deletion playground/rsbuild.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import { defineConfig } from '@rsbuild/core';
import { pluginBabel } from '@rsbuild/plugin-babel';
import { pluginVue } from '@rsbuild/plugin-vue';
import { pluginVueJsx } from '../src';

export default defineConfig({
plugins: [pluginVueJsx()],
plugins: [
pluginVue(),
pluginVueJsx(),
pluginBabel({
include: /\.(?:jsx|tsx)$/,
}),
],
});
14 changes: 14 additions & 0 deletions playground/src/A.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineComponent, ref } from 'vue';

export default defineComponent({
name: 'Test',

setup() {
const count = ref(0);
return () => (
<button id="button1" type="button" onClick={() => count.value++}>
A: {count.value}
</button>
);
},
});
26 changes: 0 additions & 26 deletions playground/src/index.css

This file was deleted.

12 changes: 5 additions & 7 deletions playground/src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import './index.css';
import { createApp } from 'vue';
import A from './A';

document.querySelector('#root').innerHTML = `
<div class="content">
<h1>Vanilla Rsbuild</h1>
<p>Start building amazing things with Rsbuild.</p>
</div>
`;
console.log(A);

createApp(A).mount('#root');
44 changes: 0 additions & 44 deletions test/old/index.test.ts

This file was deleted.

1 change: 0 additions & 1 deletion test/old/src/index.js

This file was deleted.

0 comments on commit bbbfb88

Please sign in to comment.