All Projects → caoxiemeihao → Electron Vue Vite

caoxiemeihao / Electron Vue Vite

Electron、vue3、vite2、ant-design-vue2 整合

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Electron Vue Vite

Serverless Plugin Typescript
Serverless plugin for zero-config Typescript support
Stars: ✭ 611 (+748.61%)
Mutual labels:  rollup
Svelte Tailwind Extension Boilerplate
A Chrome extension boilerplate built with Svelte, TailwindCSS, Jest, and Rollup.
Stars: ✭ 26 (-63.89%)
Mutual labels:  rollup
Pectin
Rollup-related tools for incremental transpilation of packages in Lerna-based monorepos
Stars: ✭ 50 (-30.56%)
Mutual labels:  rollup
Jslib Base
A modern JavaScript|Typescript library scaffolding, modularity, purity & extras
Stars: ✭ 721 (+901.39%)
Mutual labels:  rollup
Preppy
A simple and lightweight tool for preparing the publish of NPM packages.
Stars: ✭ 23 (-68.06%)
Mutual labels:  rollup
Bili
Bili makes it easier to bundle JavaScript libraries.
Stars: ✭ 949 (+1218.06%)
Mutual labels:  rollup
Angular Seed
🌱 [Deprecated] Extensible, reliable, modular, PWA ready starter project for Angular (2 and beyond) with statically typed build and AoT compilation
Stars: ✭ 4,681 (+6401.39%)
Mutual labels:  rollup
Import Http
Import modules from URL instead of local node_modules
Stars: ✭ 1,150 (+1497.22%)
Mutual labels:  rollup
Preact Redux Typescript Rollup Starter
Smallest "React-like" + Redux starter EVER - 13KB min&gzip
Stars: ✭ 24 (-66.67%)
Mutual labels:  rollup
Hyperapp Boilerplate
This is a sample/boilerplate project that shows how to create a production-ready hyperapp application.
Stars: ✭ 45 (-37.5%)
Mutual labels:  rollup
Rollup Plugin Vue
Roll .vue files
Stars: ✭ 747 (+937.5%)
Mutual labels:  rollup
Download Your Travelmap
free your travelmap
Stars: ✭ 22 (-69.44%)
Mutual labels:  rollup
Sapper Template Firebase
Starter Rollup template for Sapper apps with Firebase functions based on https://github.com/nhristov/sapper-template-rollup.
Stars: ✭ 29 (-59.72%)
Mutual labels:  rollup
Microbundle
📦 Zero-configuration bundler for tiny modules.
Stars: ✭ 6,622 (+9097.22%)
Mutual labels:  rollup
Rollup Plugin Size
🍣 Track compressed Rollup asset sizes over time.
Stars: ✭ 57 (-20.83%)
Mutual labels:  rollup
Rollup Plugin Typescript2
Rollup plugin for typescript with compiler errors.
Stars: ✭ 594 (+725%)
Mutual labels:  rollup
Rollup Plugin Dev
development server for rollup with additional logging and options
Stars: ✭ 29 (-59.72%)
Mutual labels:  rollup
Egeo
EGEO is the open-source UI library used to build Stratio's UI. It includes UI Components, Utilities, Services and much more to build user interfaces quickly and with ease. The library is distributed in AoT mode.
Stars: ✭ 69 (-4.17%)
Mutual labels:  rollup
Handroll
🍣 Expertly rolled JavaScript. CLI + library for bundling JavaScript with Rollup.js
Stars: ✭ 66 (-8.33%)
Mutual labels:  rollup
Tsdx
Zero-config CLI for TypeScript package development
Stars: ✭ 9,010 (+12413.89%)
Mutual labels:  rollup

electron-vue-vite

Electron + vue3 + vite2 + ant-design-vue2 整合

🐛 已知问题

简书地址

How and Why

  • 写这个 Demo 项目主要有两个目的
    1. [email protected] 发布了,想试试新功能
    2. 工作中用的 umi+electron 项目大了,启动速度并不理想; 用 vite 试试,算一个储备方案 ^_^

Command

  • npm run dev
  • npm run build


Note 踩坑记

  • import { write } from 'fs' 的这种形式会被 vite 编译成 /@modules/fs?import
  • const { write } = require('fs') 这种形式就能用了 😉
  • const { ipcRenderer } = require('electron') 同理
  • 21-02-18 "rollup-plugin-esbuild": "^2.4.2", 有 BUG
  • 21-02-18 tsconfig.json中不能有多余的逗号,不然 rollup-plugin-esbuild 会有如下警告
     SyntaxError: Unexpected token ] in JSON at position 428
        at JSON.parse (<anonymous>)
        at Object.load (/Users/caoxie/Desktop/github/electron-vue-vite2/node_modules/rollup-plugin-esbuild/dist/index.js:21:17) {
      code: 'PLUGIN_ERROR',
      plugin: 'esbuild',
      hook: 'transform',
      id: '/Users/caoxie/Desktop/github/electron-vue-vite2/src/main/index.ts',
      watchFiles: [
        '/Users/caoxie/Desktop/github/electron-vue-vite2/src/main/index.ts'
      ]
    }
    
  • 21-02-18 main 进程中暂时无法用 require,打包后会导致模块找不到
  • 21-02-18 "asar": false 这样可以保障 "extraResources" 能够正常搬运到文件夹中
  • 21-02-18 报错 React is not defined
    • 参考链接 https://github.com/vitejs/vite/issues/1286
    • 参考链接 https://github.com/vitejs/vite/tree/main/packages/plugin-vue-jsx
    // vite.config.js
    import vueJsx from '@vitejs/plugin-vue-jsx'
    
    export default {
      plugins: [
        vueJsx({
          // options are passed on to @vue/babel-plugin-jsx
        })
      ],
      esbuild: {
        jsxFactory: 'h',
        jsxFragment: 'Fragment'
      },
    }
    
  • 21-02-19 报错 https://github.com/ajv-validator/ajv/issues/1399
    Circular dependency: node_modules\conf\node_modules\ajv\dist\compile\validate\dataType.js -> node_modules\conf\node_modules\ajv\dist\compile\util.js -> node_modules\conf\node_modules\ajv\dist\compile\validate\index.js -> node_modules\conf\node_modules\ajv\dist\compile\validate\dataType.js
    

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].