pack: add jsx support and remove babel modules
This commit is contained in:
1 parent
c19619d60d
commit
b77a98d8bd
7 files changed
+66
-2458
No files matched your search
@@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"comments": false,
|
|
||||||
"env": {
|
|
||||||
"main": {
|
|
||||||
"presets": [
|
|
||||||
["@babel/preset-env", {
|
|
||||||
"targets": { "node": 17 }
|
|
||||||
}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"renderer": {
|
|
||||||
"presets": [
|
|
||||||
["@babel/preset-env", {
|
|
||||||
"modules": false
|
|
||||||
}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"web": {
|
|
||||||
"presets": [
|
|
||||||
["@babel/preset-env", {
|
|
||||||
"modules": false
|
|
||||||
}]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"plugins": ["@vue/babel-plugin-jsx", "@babel/plugin-transform-runtime"]
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
"root": true,
|
"root": true,
|
||||||
"parser": "vue-eslint-parser",
|
"parser": "vue-eslint-parser",
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"parser": "@babel/eslint-parser",
|
|
||||||
"sourceType": "module",
|
"sourceType": "module",
|
||||||
"ecmaVersion": 2020,
|
"ecmaVersion": 2020,
|
||||||
"ecmaFeatures": {
|
"ecmaFeatures": {
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ https://github.com/jooy2/vutron-webpack
|
|||||||
- [Vue-router 4.x](https://router.vuejs.org)
|
- [Vue-router 4.x](https://router.vuejs.org)
|
||||||
- [Pinia 2.x](https://pinia.vuejs.org)
|
- [Pinia 2.x](https://pinia.vuejs.org)
|
||||||
- [Vuetify 3.x (Beta)](https://next.vuetifyjs.com)
|
- [Vuetify 3.x (Beta)](https://next.vuetifyjs.com)
|
||||||
- [BabelJS 7.x](https://babeljs.io)
|
|
||||||
- [ESLint 8.x](https://eslint.org)
|
- [ESLint 8.x](https://eslint.org)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|||||||
Generated
+58
-2424
File diff suppressed because it is too large.
Load diff
+1
-5
@@ -28,12 +28,8 @@
|
|||||||
"vuetify": "^3.0.0-beta.13"
|
"vuetify": "^3.0.0-beta.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.19.1",
|
|
||||||
"@babel/eslint-parser": "^7.19.1",
|
|
||||||
"@babel/plugin-transform-runtime": "^7.19.1",
|
|
||||||
"@babel/preset-env": "^7.19.1",
|
|
||||||
"@vitejs/plugin-vue": "^3.1.2",
|
"@vitejs/plugin-vue": "^3.1.2",
|
||||||
"@vue/babel-plugin-jsx": "^1.1.1",
|
"@vitejs/plugin-vue-jsx": "^2.0.1",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"electron": "^21.0.0",
|
"electron": "^21.0.0",
|
||||||
"electron-builder": "^23.3.3",
|
"electron-builder": "^23.3.3",
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import Utils from '@/renderer/utils'
|
|||||||
const { locale } = useI18n()
|
const { locale } = useI18n()
|
||||||
const theme = useTheme()
|
const theme = useTheme()
|
||||||
|
|
||||||
|
const jsxNode = () => {
|
||||||
|
return <div> text </div>
|
||||||
|
}
|
||||||
|
|
||||||
const handleChangeTheme = () => {
|
const handleChangeTheme = () => {
|
||||||
theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark'
|
theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark'
|
||||||
}
|
}
|
||||||
@@ -29,6 +33,7 @@ const handleAbout = async () => {
|
|||||||
align="center"
|
align="center"
|
||||||
class="text-center"
|
class="text-center"
|
||||||
>
|
>
|
||||||
|
<jsxNode />
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<img
|
<img
|
||||||
alt="logo"
|
alt="logo"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import electron from 'vite-plugin-electron'
|
import electron from 'vite-plugin-electron'
|
||||||
|
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import { resolve, join } from 'path'
|
import { resolve, join } from 'path'
|
||||||
import { builtinModules } from 'module'
|
import { builtinModules } from 'module'
|
||||||
@@ -31,6 +32,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
|
vueJsx(),
|
||||||
electron({
|
electron({
|
||||||
main: {
|
main: {
|
||||||
entry: 'src/main/index.js',
|
entry: 'src/main/index.js',
|
||||||
|
|||||||
Reference in new issue
Block a user