pack: prettier now use space instead of tab

This commit is contained in:
leejooy96 committed 2022-11-13 11:21:33 +09:00
1 parent 2f55889ef8
commit ab7df03aa3
31 files changed
+705 -706

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ root = true
[*] [*]
charset = utf-8 charset = utf-8
end_of_line = lf end_of_line = lf
indent_style = tab indent_style = space
indent_size = 2 indent_size = 2
insert_final_newline = true insert_final_newline = true
max_line_length = 80 max_line_length = 80
+29 -29
View File
@@ -1,31 +1,31 @@
{ {
"root": true, "root": true,
"parser": "vue-eslint-parser", "parser": "vue-eslint-parser",
"parserOptions": { "parserOptions": {
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser",
"sourceType": "module", "sourceType": "module",
"ecmaVersion": 2022, "ecmaVersion": 2022,
"ecmaFeatures": { "ecmaFeatures": {
"jsx": true "jsx": true
} }
}, },
"env": { "env": {
"node": true, "node": true,
"es6": true "es6": true
}, },
"extends": ["standard", "plugin:vue/vue3-recommended", "prettier"], "extends": ["standard", "plugin:vue/vue3-recommended", "prettier"],
"globals": { "globals": {
"__static": true "__static": true
}, },
"plugins": ["vue"], "plugins": ["vue"],
"rules": { "rules": {
"arrow-parens": 0, "arrow-parens": 0,
"generator-star-spacing": 0, "generator-star-spacing": 0,
"no-case-declarations": 0, "no-case-declarations": 0,
"array-callback-return": 0, "array-callback-return": 0,
"no-trailing-spaces": 1, "no-trailing-spaces": 1,
"no-control-regex": 0, "no-control-regex": 0,
"no-useless-constructor": 0, "no-useless-constructor": 0,
"node/no-deprecated-api": 0 "node/no-deprecated-api": 0
} }
} }
+17 -18
View File
@@ -1,20 +1,19 @@
{ {
"printWidth": 100, "printWidth": 100,
"tabWidth": 2, "useTabs": false,
"useTabs": true, "semi": false,
"semi": false, "vueIndentScriptAndStyle": false,
"vueIndentScriptAndStyle": false, "singleQuote": true,
"singleQuote": true, "quoteProps": "as-needed",
"quoteProps": "as-needed", "trailingComma": "none",
"trailingComma": "none", "bracketSpacing": true,
"bracketSpacing": true, "bracketSameLine": false,
"bracketSameLine": false, "jsxBracketSameLine": false,
"jsxBracketSameLine": false, "jsxSingleQuote": false,
"jsxSingleQuote": false, "arrowParens": "always",
"arrowParens": "always", "insertPragma": false,
"insertPragma": false, "requirePragma": false,
"requirePragma": false, "proseWrap": "never",
"proseWrap": "never", "htmlWhitespaceSensitivity": "strict",
"htmlWhitespaceSensitivity": "strict", "endOfLine": "lf"
"endOfLine": "lf"
} }
+12 -12
View File
@@ -1,16 +1,16 @@
import { generateSidebar } from 'vitepress-sidebar' import { generateSidebar } from 'vitepress-sidebar'
export default { export default {
title: 'Vutron', title: 'Vutron',
description: 'Quick Start Templates for Vite + Vue 3 + Electron', description: 'Quick Start Templates for Vite + Vue 3 + Electron',
themeConfig: { themeConfig: {
sidebar: generateSidebar({ sidebar: generateSidebar({
root: 'docs', root: 'docs',
collapsible: false, collapsible: false,
collapsed: false, collapsed: false,
useTitleFromFileHeading: true, useTitleFromFileHeading: true,
sortByFileName: ['getting-started.md', 'build-configuration.md', 'npm-scripts.md'] sortByFileName: ['getting-started.md', 'build-configuration.md', 'npm-scripts.md']
}), }),
socialLinks: [{ icon: 'github', link: 'https://github.com/jooy2/vutron' }] socialLinks: [{ icon: 'github', link: 'https://github.com/jooy2/vutron' }]
} }
} }
+21 -21
View File
@@ -21,9 +21,9 @@ For projects that use the **Native Node Module**, add the following script to yo
```json ```json
{ {
"scripts": { "scripts": {
"postinstall": "electron-builder install-app-deps" "postinstall": "electron-builder install-app-deps"
} }
} }
``` ```
@@ -49,23 +49,23 @@ Below is an unnecessary `node_modules` file pattern that can further save bundle
```json ```json
[ [
"!**/.*", "!**/.*",
"!**/node_modules/**/{CONTRIBUTORS,CNAME,AUTHOR,TODO,CONTRIBUTING,COPYING,INSTALL,NEWS,PORTING,Makefile,htdocs,CHANGELOG,ChangeLog,changelog,README,Readme,readme,test,sample,example,demo,composer.json,tsconfig.json,jsdoc.json,tslint.json,typings.json,gulpfile,bower.json,package-lock,Gruntfile,CMakeLists,karma.conf,yarn.lock}*", "!**/node_modules/**/{CONTRIBUTORS,CNAME,AUTHOR,TODO,CONTRIBUTING,COPYING,INSTALL,NEWS,PORTING,Makefile,htdocs,CHANGELOG,ChangeLog,changelog,README,Readme,readme,test,sample,example,demo,composer.json,tsconfig.json,jsdoc.json,tslint.json,typings.json,gulpfile,bower.json,package-lock,Gruntfile,CMakeLists,karma.conf,yarn.lock}*",
"!**/node_modules/**/{man,benchmark,node_modules,spec,cmake,browser,vagrant,doxy*,bin,obj,obj.target,example,examples,test,tests,doc,docs,msvc,Xcode,CVS,RCS,SCCS}{,/**/*}", "!**/node_modules/**/{man,benchmark,node_modules,spec,cmake,browser,vagrant,doxy*,bin,obj,obj.target,example,examples,test,tests,doc,docs,msvc,Xcode,CVS,RCS,SCCS}{,/**/*}",
"!**/node_modules/**/*.{conf,png,pc,coffee,txt,spec.js,ts,js.flow,html,def,jst,xml,ico,in,ac,sln,dsp,dsw,cmd,vcproj,vcxproj,vcxproj.filters,pdb,exp,obj,lib,map,md,sh,gypi,gyp,h,cpp,yml,log,tlog,Makefile,mk,c,cc,rc,xcodeproj,xcconfig,d.ts,yaml,hpp}", "!**/node_modules/**/*.{conf,png,pc,coffee,txt,spec.js,ts,js.flow,html,def,jst,xml,ico,in,ac,sln,dsp,dsw,cmd,vcproj,vcxproj,vcxproj.filters,pdb,exp,obj,lib,map,md,sh,gypi,gyp,h,cpp,yml,log,tlog,Makefile,mk,c,cc,rc,xcodeproj,xcconfig,d.ts,yaml,hpp}",
"!**/node_modules/**/node-v*-x64{,/**/*}", "!**/node_modules/**/node-v*-x64{,/**/*}",
"!**/node_modules/bluebird/js/browser{,/**/*}", "!**/node_modules/bluebird/js/browser{,/**/*}",
"!**/node_modules/bluebird/js/browser{,/**/*}", "!**/node_modules/bluebird/js/browser{,/**/*}",
"!**/node_modules/source-map/dist{,/**/*}", "!**/node_modules/source-map/dist{,/**/*}",
"!**/node_modules/lodash/fp{,/**/*}", "!**/node_modules/lodash/fp{,/**/*}",
"!**/node_modules/async/!(dist|package.json)", "!**/node_modules/async/!(dist|package.json)",
"!**/node_modules/async/internal{,/**/*}", "!**/node_modules/async/internal{,/**/*}",
"!**/node_modules/ajv/dist{,/**/*}", "!**/node_modules/ajv/dist{,/**/*}",
"!**/node_modules/ajv/scripts{,/**/*}", "!**/node_modules/ajv/scripts{,/**/*}",
"!**/node_modules/node-pre-gyp/!(lib|package.json)", "!**/node_modules/node-pre-gyp/!(lib|package.json)",
"!**/node_modules/node-pre-gyp/lib/!(util|pre-binding.js|node-pre-gyp.js)", "!**/node_modules/node-pre-gyp/lib/!(util|pre-binding.js|node-pre-gyp.js)",
"!**/node_modules/node-pre-gyp/lib/util/!(versioning.js|abi_crosswalk.json)", "!**/node_modules/node-pre-gyp/lib/util/!(versioning.js|abi_crosswalk.json)",
"!**/node_modules/source-map-support/browser-source-map-support.js", "!**/node_modules/source-map-support/browser-source-map-support.js",
"!**/node_modules/json-schema/!(package.json|lib)" "!**/node_modules/json-schema/!(package.json|lib)"
] ]
``` ```
+93 -93
View File
@@ -1,97 +1,97 @@
{ {
productName: 'Vutron', productName: 'Vutron',
appId: 'com.vutron.vutron', appId: 'com.vutron.vutron',
asar: true, asar: true,
extends: null, extends: null,
compression: 'maximum', compression: 'maximum',
copyright: 'ⓒ 2022 ${author}', copyright: 'ⓒ 2022 ${author}',
artifactName: '${productName} ${version}_${arch}.${ext}', artifactName: '${productName} ${version}_${arch}.${ext}',
directories: { directories: {
buildResources: 'buildAssets', buildResources: 'buildAssets',
output: './release/${version}' output: './release/${version}'
}, },
/* A list of files not to be included in the build. */ /* A list of files not to be included in the build. */
files: [ files: [
/* /*
(Required) The files and folders listed below should not be included in the build. (Required) The files and folders listed below should not be included in the build.
*/ */
'dist/**/*', 'dist/**/*',
'!docs/**/*', '!docs/**/*',
'!release/**/*' '!release/**/*'
], ],
mac: { mac: {
bundleVersion: '1.0', bundleVersion: '1.0',
hardenedRuntime: true, hardenedRuntime: true,
gatekeeperAssess: false, gatekeeperAssess: false,
icon: 'buildAssets/icons/icon.icns', icon: 'buildAssets/icons/icon.icns',
type: 'distribution', type: 'distribution',
target: [ target: [
{ {
target: 'dmg', target: 'dmg',
arch: ['x64', 'arm64', 'universal'] arch: ['x64', 'arm64', 'universal']
} }
] ]
}, },
dmg: { dmg: {
contents: [ contents: [
{ {
x: 410, x: 410,
y: 150, y: 150,
type: 'link', type: 'link',
path: '/Applications' path: '/Applications'
}, },
{ {
x: 130, x: 130,
y: 150, y: 150,
type: 'file' type: 'file'
} }
], ],
sign: false sign: false
}, },
win: { win: {
icon: 'buildAssets/icons/icon.ico', icon: 'buildAssets/icons/icon.ico',
target: [ target: [
{ {
target: 'appx', target: 'appx',
arch: 'x64' arch: 'x64'
}, },
{ {
target: 'zip', target: 'zip',
arch: 'x64' arch: 'x64'
}, },
{ {
target: 'portable', target: 'portable',
arch: 'x64' arch: 'x64'
}, },
{ {
target: 'nsis', target: 'nsis',
arch: 'x64' arch: 'x64'
} }
] ]
}, },
portable: { portable: {
artifactName: '${productName} ${version}_${arch} Portable.${ext}' artifactName: '${productName} ${version}_${arch} Portable.${ext}'
}, },
nsis: { nsis: {
oneClick: true oneClick: true
}, },
linux: { linux: {
executableName: 'vutron', executableName: 'vutron',
icon: 'buildAssets/icons', icon: 'buildAssets/icons',
category: 'Utility', category: 'Utility',
target: [ target: [
{ {
target: 'snap', target: 'snap',
arch: 'x64' arch: 'x64'
}, },
{ {
target: 'deb', target: 'deb',
arch: 'x64' arch: 'x64'
}, },
{ {
target: 'rpm', target: 'rpm',
arch: 'x64' arch: 'x64'
} }
] ]
} }
} }
+62 -62
View File
@@ -1,64 +1,64 @@
{ {
"name": "vutron", "name": "vutron",
"version": "1.0.0", "version": "1.0.0",
"description": "Quick Start Templates for Vite + Vue 3 + Electron", "description": "Quick Start Templates for Vite + Vue 3 + Electron",
"homepage": "https://vutron.jooy2.com", "homepage": "https://vutron.jooy2.com",
"author": "jooy2 <jootc.help@gmail.com>", "author": "jooy2 <jootc.help@gmail.com>",
"license": "MIT", "license": "MIT",
"main": "dist/main/index.js", "main": "dist/main/index.js",
"scripts": { "scripts": {
"dev": "cross-env NODE_ENV=development vite", "dev": "cross-env NODE_ENV=development vite",
"build": "npm run build:pre && electron-builder -wml", "build": "npm run build:pre && electron-builder -wml",
"build:pre": "npm run format:fix && vue-tsc --noEmit && cross-env NODE_ENV=production vite build", "build:pre": "npm run format:fix && vue-tsc --noEmit && cross-env NODE_ENV=production vite build",
"build:dir": "npm run build:pre && electron-builder --dir", "build:dir": "npm run build:pre && electron-builder --dir",
"build:mac": "npm run build:pre && CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --mac", "build:mac": "npm run build:pre && CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --mac",
"build:linux": "npm run build:pre && electron-builder --linux", "build:linux": "npm run build:pre && electron-builder --linux",
"build:win": "npm run build:pre && electron-builder --windows", "build:win": "npm run build:pre && electron-builder --windows",
"lint": "eslint --ext .js,.ts,.vue -f ./node_modules/eslint-friendly-formatter src", "lint": "eslint --ext .js,.ts,.vue -f ./node_modules/eslint-friendly-formatter src",
"lint:fix": "eslint --ext .js,.ts,.vue -f ./node_modules/eslint-friendly-formatter --fix src", "lint:fix": "eslint --ext .js,.ts,.vue -f ./node_modules/eslint-friendly-formatter --fix src",
"format": "prettier .", "format": "prettier .",
"format:fix": "prettier . --write", "format:fix": "prettier . --write",
"docs:install": "npm i --no-save vitepress vitepress-sidebar", "docs:install": "npm i --no-save vitepress vitepress-sidebar",
"docs:dev": "vitepress dev docs", "docs:dev": "vitepress dev docs",
"docs:build": "npm run format:fix && vitepress build docs", "docs:build": "npm run format:fix && vitepress build docs",
"docs:serve": "npm run docs:build && vitepress serve docs" "docs:serve": "npm run docs:build && vitepress serve docs"
}, },
"engines": { "engines": {
"node": ">=16.0.0" "node": ">=16.0.0"
}, },
"dependencies": { "dependencies": {
"@electron/remote": "^2.0.8", "@electron/remote": "^2.0.8",
"pinia": "^2.0.22", "pinia": "^2.0.22",
"vue": "^3.2.39", "vue": "^3.2.39",
"vue-i18n": "^9.2.2", "vue-i18n": "^9.2.2",
"vue-router": "^4.1.6", "vue-router": "^4.1.6",
"vuetify": "^3.0.0" "vuetify": "^3.0.0"
}, },
"devDependencies": { "devDependencies": {
"@mdi/font": "^7.0.96", "@mdi/font": "^7.0.96",
"@typescript-eslint/eslint-plugin": "^5.42.0", "@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0", "@typescript-eslint/parser": "^5.42.0",
"@vitejs/plugin-vue": "^3.2.0", "@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue-jsx": "^2.1.1", "@vitejs/plugin-vue-jsx": "^2.1.1",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"electron": "^21.2.2", "electron": "^21.2.2",
"electron-builder": "^23.3.3", "electron-builder": "^23.3.3",
"eslint": "^8.27.0", "eslint": "^8.27.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-config-standard": "^17.0.0", "eslint-config-standard": "^17.0.0",
"eslint-friendly-formatter": "^4.0.1", "eslint-friendly-formatter": "^4.0.1",
"eslint-plugin-import": "^2.26.0", "eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.5.0", "eslint-plugin-n": "^15.5.0",
"eslint-plugin-promise": "^6.1.1", "eslint-plugin-promise": "^6.1.1",
"eslint-plugin-vue": "^9.7.0", "eslint-plugin-vue": "^9.7.0",
"prettier": "^2.7.1", "prettier": "^2.7.1",
"typescript": "^4.8.4", "typescript": "^4.8.4",
"vite": "^3.2.3", "vite": "^3.2.3",
"vite-plugin-electron": "^0.10.2", "vite-plugin-electron": "^0.10.2",
"vite-plugin-electron-renderer": "^0.10.2", "vite-plugin-electron-renderer": "^0.10.2",
"vite-plugin-eslint": "^1.8.1", "vite-plugin-eslint": "^1.8.1",
"vite-plugin-vuetify": "^1.0.0", "vite-plugin-vuetify": "^1.0.0",
"vue-eslint-parser": "^9.1.0", "vue-eslint-parser": "^9.1.0",
"vue-tsc": "^1.0.9" "vue-tsc": "^1.0.9"
} }
} }
+67 -67
View File
@@ -3,91 +3,91 @@ import Constants from './utils/Constants'
import * as electronRemote from '@electron/remote/main' import * as electronRemote from '@electron/remote/main'
const exitApp = (mainWindow: BrowserWindow): void => { const exitApp = (mainWindow: BrowserWindow): void => {
if (mainWindow && !mainWindow.isDestroyed()) { if (mainWindow && !mainWindow.isDestroyed()) {
mainWindow.hide() mainWindow.hide()
} }
mainWindow.destroy() mainWindow.destroy()
app.exit() app.exit()
} }
export const createMainWindow = async (mainWindow: BrowserWindow): Promise<BrowserWindow> => { export const createMainWindow = async (mainWindow: BrowserWindow): Promise<BrowserWindow> => {
mainWindow = new BrowserWindow({ mainWindow = new BrowserWindow({
title: Constants.APP_NAME, title: Constants.APP_NAME,
show: false, show: false,
width: Constants.IS_DEV_ENV ? 1500 : 1200, width: Constants.IS_DEV_ENV ? 1500 : 1200,
height: 650, height: 650,
useContentSize: true, useContentSize: true,
webPreferences: Constants.DEFAULT_WEB_PREFERENCES webPreferences: Constants.DEFAULT_WEB_PREFERENCES
}) })
mainWindow.setMenu(null) mainWindow.setMenu(null)
mainWindow.on('close', (event: Event) => { mainWindow.on('close', (event: Event) => {
event.preventDefault() event.preventDefault()
exitApp(mainWindow) exitApp(mainWindow)
}) })
mainWindow.webContents.on('did-frame-finish-load', () => { mainWindow.webContents.on('did-frame-finish-load', () => {
if (Constants.IS_DEV_ENV) { if (Constants.IS_DEV_ENV) {
mainWindow.webContents.openDevTools() mainWindow.webContents.openDevTools()
} }
}) })
mainWindow.once('ready-to-show', () => { mainWindow.once('ready-to-show', () => {
mainWindow.setAlwaysOnTop(true) mainWindow.setAlwaysOnTop(true)
mainWindow.show() mainWindow.show()
mainWindow.focus() mainWindow.focus()
mainWindow.setAlwaysOnTop(false) mainWindow.setAlwaysOnTop(false)
electronRemote.initialize() electronRemote.initialize()
}) })
if (Constants.IS_DEV_ENV) { if (Constants.IS_DEV_ENV) {
await mainWindow.loadURL(Constants.APP_INDEX_URL_DEV) await mainWindow.loadURL(Constants.APP_INDEX_URL_DEV)
} else { } else {
await mainWindow.loadFile(Constants.APP_INDEX_URL_PROD) await mainWindow.loadFile(Constants.APP_INDEX_URL_PROD)
} }
return mainWindow return mainWindow
} }
export const createErrorWindow = async ( export const createErrorWindow = async (
errorWindow: BrowserWindow, errorWindow: BrowserWindow,
mainWindow: BrowserWindow, mainWindow: BrowserWindow,
details?: RenderProcessGoneDetails details?: RenderProcessGoneDetails
): Promise<BrowserWindow> => { ): Promise<BrowserWindow> => {
if (!Constants.IS_DEV_ENV) { if (!Constants.IS_DEV_ENV) {
mainWindow?.hide() mainWindow?.hide()
} }
errorWindow = new BrowserWindow({ errorWindow = new BrowserWindow({
title: Constants.APP_NAME, title: Constants.APP_NAME,
show: false, show: false,
resizable: Constants.IS_DEV_ENV, resizable: Constants.IS_DEV_ENV,
webPreferences: Constants.DEFAULT_WEB_PREFERENCES webPreferences: Constants.DEFAULT_WEB_PREFERENCES
}) })
errorWindow.setMenu(null) errorWindow.setMenu(null)
if (Constants.IS_DEV_ENV) { if (Constants.IS_DEV_ENV) {
await errorWindow.loadURL(`${Constants.APP_INDEX_URL_DEV}#/error`) await errorWindow.loadURL(`${Constants.APP_INDEX_URL_DEV}#/error`)
} else { } else {
await errorWindow.loadFile(Constants.APP_INDEX_URL_PROD, { hash: 'error' }) await errorWindow.loadFile(Constants.APP_INDEX_URL_PROD, { hash: 'error' })
} }
errorWindow.on('ready-to-show', () => { errorWindow.on('ready-to-show', () => {
if (!Constants.IS_DEV_ENV && mainWindow && !mainWindow.isDestroyed()) { if (!Constants.IS_DEV_ENV && mainWindow && !mainWindow.isDestroyed()) {
mainWindow.destroy() mainWindow.destroy()
} }
errorWindow.show() errorWindow.show()
errorWindow.focus() errorWindow.focus()
}) })
errorWindow.webContents.on('did-frame-finish-load', () => { errorWindow.webContents.on('did-frame-finish-load', () => {
if (Constants.IS_DEV_ENV) { if (Constants.IS_DEV_ENV) {
errorWindow.webContents.openDevTools() errorWindow.webContents.openDevTools()
} }
}) })
return errorWindow return errorWindow
} }
+15 -15
View File
@@ -7,33 +7,33 @@ let mainWindow
let errorWindow let errorWindow
app.on('ready', () => { app.on('ready', () => {
macOSDisableDefaultMenuItem() macOSDisableDefaultMenuItem()
mainWindow = createMainWindow(mainWindow) mainWindow = createMainWindow(mainWindow)
}) })
app.on('activate', () => { app.on('activate', () => {
if (!mainWindow) { if (!mainWindow) {
mainWindow = createMainWindow(mainWindow) mainWindow = createMainWindow(mainWindow)
} }
}) })
app.on('window-all-closed', () => { app.on('window-all-closed', () => {
mainWindow = null mainWindow = null
errorWindow = null errorWindow = null
if (!Constants.IS_MAC) { if (!Constants.IS_MAC) {
app.quit() app.quit()
} }
}) })
app.on( app.on(
'render-process-gone', 'render-process-gone',
(event: Event, webContents: WebContents, details: RenderProcessGoneDetails) => { (event: Event, webContents: WebContents, details: RenderProcessGoneDetails) => {
errorWindow = createErrorWindow(errorWindow, mainWindow, details) errorWindow = createErrorWindow(errorWindow, mainWindow, details)
} }
) )
process.on('uncaughtException', () => { process.on('uncaughtException', () => {
errorWindow = createErrorWindow(errorWindow, mainWindow) errorWindow = createErrorWindow(errorWindow, mainWindow)
}) })
+11 -11
View File
@@ -1,19 +1,19 @@
import { join } from 'path' import { join } from 'path'
export default class Constants { export default class Constants {
static APP_NAME = 'Vutron' static APP_NAME = 'Vutron'
static IS_DEV_ENV = process.env.NODE_ENV === 'development' static IS_DEV_ENV = process.env.NODE_ENV === 'development'
static IS_MAC = process.platform === 'darwin' static IS_MAC = process.platform === 'darwin'
static DEFAULT_WEB_PREFERENCES = { static DEFAULT_WEB_PREFERENCES = {
nodeIntegration: true, nodeIntegration: true,
contextIsolation: false, contextIsolation: false,
nodeIntegrationInWorker: true, nodeIntegrationInWorker: true,
preload: join(__dirname, '../preload/index.js') preload: join(__dirname, '../preload/index.js')
} }
static APP_INDEX_URL_DEV = 'http://localhost:5173/index.html' static APP_INDEX_URL_DEV = 'http://localhost:5173/index.html'
static APP_INDEX_URL_PROD = join(__dirname, '../index.html') static APP_INDEX_URL_PROD = join(__dirname, '../index.html')
} }
+6 -6
View File
@@ -2,12 +2,12 @@ import { systemPreferences } from 'electron'
import Constants from './Constants' import Constants from './Constants'
export default class Menus { export default class Menus {
static macOSDisableDefaultMenuItem(): void { static macOSDisableDefaultMenuItem(): void {
if (Constants.IS_MAC) { if (Constants.IS_MAC) {
systemPreferences.setUserDefault('NSDisabledDictationMenuItem', 'boolean', true) systemPreferences.setUserDefault('NSDisabledDictationMenuItem', 'boolean', true)
systemPreferences.setUserDefault('NSDisabledCharacterPaletteMenuItem', 'boolean', true) systemPreferences.setUserDefault('NSDisabledCharacterPaletteMenuItem', 'boolean', true)
} }
} }
} }
export const { macOSDisableDefaultMenuItem } = Menus export const { macOSDisableDefaultMenuItem } = Menus
+1 -1
View File
@@ -1,5 +1,5 @@
const main = (): void => { const main = (): void => {
console.log('[Preload] Script loaded.') console.log('[Preload] Script loaded.')
} }
main() main()
+8 -8
View File
@@ -3,23 +3,23 @@ import { DefaultLayout } from '@/renderer/components/layout'
</script> </script>
<template> <template>
<DefaultLayout> <DefaultLayout>
<router-view /> <router-view />
</DefaultLayout> </DefaultLayout>
</template> </template>
<style> <style>
html { html {
overflow-y: auto !important; overflow-y: auto !important;
user-select: none; user-select: none;
} }
html, html,
body { body {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
/* Do not force capitalization of button text */ /* Do not force capitalization of button text */
.v-btn { .v-btn {
text-transform: unset !important; text-transform: unset !important;
} }
</style> </style>
@@ -3,12 +3,12 @@ import HeaderLayout from '@/renderer/components/layout/HeaderLayout.vue'
</script> </script>
<template> <template>
<v-app> <v-app>
<v-layout> <v-layout>
<HeaderLayout /> <HeaderLayout />
<v-main> <v-main>
<slot /> <slot />
</v-main> </v-main>
</v-layout> </v-layout>
</v-app> </v-app>
</template> </template>
+25 -25
View File
@@ -6,41 +6,41 @@ const route = useRoute()
const titleKey: string = (route?.meta?.titleKey || 'title.main') as string const titleKey: string = (route?.meta?.titleKey || 'title.main') as string
const handleRoute = (path: string): void => { const handleRoute = (path: string): void => {
router.push(path) router.push(path)
} }
const isCurrentRoute = (path: string): boolean => { const isCurrentRoute = (path: string): boolean => {
return path === route.path return path === route.path
} }
</script> </script>
<template> <template>
<v-app-bar color="primary" density="compact"> <v-app-bar color="primary" density="compact">
<v-app-bar-title>{{ $t(titleKey) }}</v-app-bar-title> <v-app-bar-title>{{ $t(titleKey) }}</v-app-bar-title>
<template #append> <template #append>
<v-btn <v-btn
prepend-icon="mdi-home" prepend-icon="mdi-home"
variant="text" variant="text"
:class="{ active: isCurrentRoute('/') }" :class="{ active: isCurrentRoute('/') }"
@click="handleRoute('/')" @click="handleRoute('/')"
> >
{{ $t('title.main') }} {{ $t('title.main') }}
</v-btn> </v-btn>
<v-btn <v-btn
prepend-icon="mdi-fit-to-screen-outline" prepend-icon="mdi-fit-to-screen-outline"
variant="text" variant="text"
:class="{ active: isCurrentRoute('/second') }" :class="{ active: isCurrentRoute('/second') }"
@click="handleRoute('/second')" @click="handleRoute('/second')"
> >
{{ $t('title.second') }} {{ $t('title.second') }}
</v-btn> </v-btn>
</template> </template>
</v-app-bar> </v-app-bar>
</template> </template>
<style scoped> <style scoped>
.v-btn { .v-btn {
opacity: 0.4; opacity: 0.4;
} }
.active { .active {
opacity: 1 !important; opacity: 1 !important;
} }
</style> </style>
+7 -7
View File
@@ -1,10 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
</body> </body>
<script type="module" src="./main.ts"></script> <script type="module" src="./main.ts"></script>
</html> </html>
+17 -17
View File
@@ -1,19 +1,19 @@
{ {
"desc": { "desc": {
"welcome-title": "Hello Vutron! Everything is ready.", "welcome-title": "Hello Vutron! Everything is ready.",
"welcome-desc": "You can now write cross-platform web applications. See changes in real time and build to multiple platforms with one command. If you're not already familiar with it, you can get help from the documentation page below, or run some pre-written example code.", "welcome-desc": "You can now write cross-platform web applications. See changes in real time and build to multiple platforms with one command. If you're not already familiar with it, you can get help from the documentation page below, or run some pre-written example code.",
"second-desc": "You have moved to the second screen! There is nothing here!" "second-desc": "You have moved to the second screen! There is nothing here!"
}, },
"title": { "title": {
"main": "Main Screen", "main": "Main Screen",
"second": "Second Screen", "second": "Second Screen",
"error": "Unknown Error" "error": "Unknown Error"
}, },
"menu": { "menu": {
"change-theme": "Change Theme", "change-theme": "Change Theme",
"change-language": "Change Language", "change-language": "Change Language",
"increase-count": "Count 1 increment", "increase-count": "Count 1 increment",
"documentation": "Documentation", "documentation": "Documentation",
"github": "Source Code" "github": "Source Code"
} }
} }
+17 -17
View File
@@ -1,19 +1,19 @@
{ {
"desc": { "desc": {
"welcome-title": "안녕 Vutron! 모든 준비를 마쳤습니다.", "welcome-title": "안녕 Vutron! 모든 준비를 마쳤습니다.",
"welcome-desc": "이제 크로스플랫폼 웹 애플리케이션을 작성할 수 있습니다. 변경사항을 실시간으로 확인하고 한 번의 명령으로 여러 플랫폼으로 빌드하세요. 아직 익숙하지 않다면, 아래 문서 페이지에서 도움을 받아보거나 사전에 작성된 예제 코드를 실행해볼 수 있습니다.", "welcome-desc": "이제 크로스플랫폼 웹 애플리케이션을 작성할 수 있습니다. 변경사항을 실시간으로 확인하고 한 번의 명령으로 여러 플랫폼으로 빌드하세요. 아직 익숙하지 않다면, 아래 문서 페이지에서 도움을 받아보거나 사전에 작성된 예제 코드를 실행해볼 수 있습니다.",
"second-desc": "두번째 화면으로 이동하였습니다! 여기는 아무 것도 없습니다!" "second-desc": "두번째 화면으로 이동하였습니다! 여기는 아무 것도 없습니다!"
}, },
"title": { "title": {
"main": "메인 화면", "main": "메인 화면",
"second": "두번째 화면", "second": "두번째 화면",
"error": "에러 발생" "error": "에러 발생"
}, },
"menu": { "menu": {
"change-theme": "테마 변경", "change-theme": "테마 변경",
"change-language": "언어 변경", "change-language": "언어 변경",
"increase-count": "카운트 1 증가", "increase-count": "카운트 1 증가",
"documentation": "문서", "documentation": "문서",
"github": "소스코드" "github": "소스코드"
} }
} }
+17 -17
View File
@@ -1,19 +1,19 @@
{ {
"desc": { "desc": {
"welcome-title": "你好武特龙! 一切都准备好了。", "welcome-title": "你好武特龙! 一切都准备好了。",
"welcome-desc": "您现在可以编写跨平台的 Web 应用程序。 实时查看更改并使用一个命令构建到多个平台。 如果您还不熟悉它,可以从下面的文档页面获得帮助,或者运行一些预先编写的示例代码。", "welcome-desc": "您现在可以编写跨平台的 Web 应用程序。 实时查看更改并使用一个命令构建到多个平台。 如果您还不熟悉它,可以从下面的文档页面获得帮助,或者运行一些预先编写的示例代码。",
"second-desc": "您已移至第二个屏幕! 这里什么都没有!" "second-desc": "您已移至第二个屏幕! 这里什么都没有!"
}, },
"title": { "title": {
"main": "主屏幕", "main": "主屏幕",
"second": "第二屏", "second": "第二屏",
"error": "未知错误" "error": "未知错误"
}, },
"menu": { "menu": {
"change-theme": "改变主题", "change-theme": "改变主题",
"change-language": "改变语言", "change-language": "改变语言",
"increase-count": "计数 1 个增量", "increase-count": "计数 1 个增量",
"documentation": "文档", "documentation": "文档",
"github": "源代码" "github": "源代码"
} }
} }
+17 -17
View File
@@ -1,19 +1,19 @@
{ {
"desc": { "desc": {
"welcome-title": "你好武特龍! 一切都準備好了。", "welcome-title": "你好武特龍! 一切都準備好了。",
"welcome-desc": "您現在可以編寫跨平台的 Web 應用程序。 實時查看更改並使用一個命令構建到多個平台。 如果您還不熟悉它,可以從下面的文檔頁面獲得幫助,或者運行一些預先編寫的示例代碼。", "welcome-desc": "您現在可以編寫跨平台的 Web 應用程序。 實時查看更改並使用一個命令構建到多個平台。 如果您還不熟悉它,可以從下面的文檔頁面獲得幫助,或者運行一些預先編寫的示例代碼。",
"second-desc": "您已移至第二個屏幕! 這裡什麼都沒有!" "second-desc": "您已移至第二個屏幕! 這裡什麼都沒有!"
}, },
"title": { "title": {
"main": "主屏幕", "main": "主屏幕",
"second": "第二屏", "second": "第二屏",
"error": "未知錯誤" "error": "未知錯誤"
}, },
"menu": { "menu": {
"change-theme": "改變主題", "change-theme": "改變主題",
"change-language": "改變語言", "change-language": "改變語言",
"increase-count": "計數 1 個增量", "increase-count": "計數 1 個增量",
"documentation": "文檔", "documentation": "文檔",
"github": "源代碼" "github": "源代碼"
} }
} }
+10 -10
View File
@@ -6,14 +6,14 @@ import zhHant from '@/renderer/locales/zh-hant.json'
import { getCurrentLocale } from '@/renderer/utils' import { getCurrentLocale } from '@/renderer/utils'
export default createI18n({ export default createI18n({
legacy: false, legacy: false,
locale: getCurrentLocale(), locale: getCurrentLocale(),
fallbackLocale: 'en', fallbackLocale: 'en',
globalInjection: true, globalInjection: true,
messages: { messages: {
en, en,
ko, ko,
zhHans, zhHans,
zhHant zhHant
} }
}) })
+28 -28
View File
@@ -7,32 +7,32 @@ import '@mdi/font/css/materialdesignicons.min.css'
import colors from 'vuetify/lib/util/colors.mjs' import colors from 'vuetify/lib/util/colors.mjs'
export default createVuetify({ export default createVuetify({
locale: { locale: {
messages: { ko, en, zhHans, zhHant }, messages: { ko, en, zhHans, zhHant },
locale: 'en', locale: 'en',
fallback: 'en' fallback: 'en'
}, },
icons: { icons: {
defaultSet: 'mdi', defaultSet: 'mdi',
aliases, aliases,
sets: { sets: {
mdi mdi
} }
}, },
theme: { theme: {
themes: { themes: {
light: { light: {
dark: false, dark: false,
colors: { colors: {
primary: colors.green.darken2 primary: colors.green.darken2
} }
}, },
dark: { dark: {
dark: true, dark: true,
colors: { colors: {
primary: colors.green.darken4 primary: colors.green.darken4
} }
} }
} }
} }
}) })
+28 -28
View File
@@ -2,32 +2,32 @@ import { createRouter, createWebHashHistory } from 'vue-router/dist/vue-router.e
import { MainScreen, ErrorScreen, SecondScreen } from '@/renderer/screens' import { MainScreen, ErrorScreen, SecondScreen } from '@/renderer/screens'
export default createRouter({ export default createRouter({
history: createWebHashHistory(), history: createWebHashHistory(),
routes: [ routes: [
{ {
path: '/', path: '/',
component: MainScreen, component: MainScreen,
meta: { meta: {
titleKey: 'title.main' titleKey: 'title.main'
} }
}, },
{ {
path: '/second', path: '/second',
component: SecondScreen, component: SecondScreen,
meta: { meta: {
titleKey: 'title.second' titleKey: 'title.second'
} }
}, },
{ {
path: '/error', path: '/error',
component: ErrorScreen, component: ErrorScreen,
meta: { meta: {
titleKey: 'title.error' titleKey: 'title.error'
} }
}, },
{ {
path: '/:pathMatch(.*)*', path: '/:pathMatch(.*)*',
redirect: '/' redirect: '/'
} }
] ]
}) })
+1 -1
View File
@@ -1,5 +1,5 @@
<script setup lang="tsx"></script> <script setup lang="tsx"></script>
<template> <template>
<div>Unknown error occurred</div> <div>Unknown error occurred</div>
</template> </template>
+68 -68
View File
@@ -15,88 +15,88 @@ const languages = ref(['en'])
languages.value = availableLocales languages.value = availableLocales
const handleChangeTheme = (): void => { const handleChangeTheme = (): void => {
theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark' theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark'
} }
const handleChangeLanguage = (val): void => { const handleChangeLanguage = (val): void => {
locale.value = val locale.value = val
} }
const handleDocument = async (): Promise<void> => { const handleDocument = async (): Promise<void> => {
await openExternal('https://vutron.jooy2.com') await openExternal('https://vutron.jooy2.com')
} }
const handleGitHub = async (): Promise<void> => { const handleGitHub = async (): Promise<void> => {
await openExternal('https://github.com/jooy2/vutron') await openExternal('https://github.com/jooy2/vutron')
} }
const handleCountIncrease = (): void => { const handleCountIncrease = (): void => {
counterIncrease(1) counterIncrease(1)
} }
</script> </script>
<template> <template>
<v-container> <v-container>
<v-row no-gutters align="center" class="text-center"> <v-row no-gutters align="center" class="text-center">
<v-col cols="12" md="5"> <v-col cols="12" md="5">
<img <img
alt="logo" alt="logo"
draggable="false" draggable="false"
class="ma-auto h-auto w-75" class="ma-auto h-auto w-75"
src="/images/vutron-logo.webp" src="/images/vutron-logo.webp"
/> />
</v-col> </v-col>
<v-col cols="12" md="7"> <v-col cols="12" md="7">
<h2 class="my-4">{{ $t('desc.welcome-title') }}</h2> <h2 class="my-4">{{ $t('desc.welcome-title') }}</h2>
<p>{{ $t('desc.welcome-desc') }}</p> <p>{{ $t('desc.welcome-desc') }}</p>
<v-row class="my-4"> <v-row class="my-4">
<v-col cols="3"> <v-col cols="3">
<v-btn icon color="primary" @click="handleChangeTheme"> <v-btn icon color="primary" @click="handleChangeTheme">
<v-icon icon="mdi-brightness-6" /> <v-icon icon="mdi-brightness-6" />
<v-tooltip activator="parent" location="bottom"> <v-tooltip activator="parent" location="bottom">
{{ $t('menu.change-theme') }} {{ $t('menu.change-theme') }}
</v-tooltip> </v-tooltip>
</v-btn> </v-btn>
</v-col> </v-col>
<v-col cols="3"> <v-col cols="3">
<v-badge color="blue" :content="counter"> <v-badge color="blue" :content="counter">
<v-btn icon color="primary" @click="handleCountIncrease"> <v-btn icon color="primary" @click="handleCountIncrease">
<v-icon icon="mdi-plus-circle" /> <v-icon icon="mdi-plus-circle" />
<v-tooltip activator="parent" location="bottom"> <v-tooltip activator="parent" location="bottom">
{{ $t('menu.increase-count') }} {{ $t('menu.increase-count') }}
</v-tooltip> </v-tooltip>
</v-btn> </v-btn>
</v-badge> </v-badge>
</v-col> </v-col>
<v-col cols="3"> <v-col cols="3">
<v-btn icon color="primary" @click="handleDocument"> <v-btn icon color="primary" @click="handleDocument">
<v-icon icon="mdi-file-document" /> <v-icon icon="mdi-file-document" />
<v-tooltip activator="parent" location="bottom"> <v-tooltip activator="parent" location="bottom">
{{ $t('menu.documentation') }} {{ $t('menu.documentation') }}
</v-tooltip> </v-tooltip>
</v-btn> </v-btn>
</v-col> </v-col>
<v-col cols="3"> <v-col cols="3">
<v-btn icon color="primary" @click="handleGitHub"> <v-btn icon color="primary" @click="handleGitHub">
<v-icon icon="mdi-github" /> <v-icon icon="mdi-github" />
<v-tooltip activator="parent" location="bottom"> <v-tooltip activator="parent" location="bottom">
{{ $t('menu.github') }} {{ $t('menu.github') }}
</v-tooltip> </v-tooltip>
</v-btn> </v-btn>
</v-col> </v-col>
<v-col cols="12"> <v-col cols="12">
<v-select <v-select
:model-value="locale" :model-value="locale"
density="compact" density="compact"
:label="$t('menu.change-language')" :label="$t('menu.change-language')"
:items="languages" :items="languages"
@update:model-value="handleChangeLanguage" @update:model-value="handleChangeLanguage"
> >
{{ $t('menu.change-language') }} {{ $t('menu.change-language') }}
</v-select> </v-select>
</v-col> </v-col>
</v-row> </v-row>
</v-col> </v-col>
</v-row> </v-row>
</v-container> </v-container>
</template> </template>
+8 -8
View File
@@ -1,12 +1,12 @@
<script setup lang="tsx"></script> <script setup lang="tsx"></script>
<template> <template>
<v-container> <v-container>
<v-row no-gutters align="center" class="text-center"> <v-row no-gutters align="center" class="text-center">
<v-col cols="12"> <v-col cols="12">
<v-icon icon="mdi-emoticon-cool-outline" size="250" color="#009f57" /> <v-icon icon="mdi-emoticon-cool-outline" size="250" color="#009f57" />
</v-col> </v-col>
<v-col cols="12" class="my-4">{{ $t('desc.second-desc') }}</v-col> <v-col cols="12" class="my-4">{{ $t('desc.second-desc') }}</v-col>
</v-row> </v-row>
</v-container> </v-container>
</template> </template>
+11 -11
View File
@@ -1,15 +1,15 @@
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
export const useTempStore = defineStore('temp', { export const useTempStore = defineStore('temp', {
state: () => ({ state: () => ({
counter: 0 counter: 0
}), }),
getters: { getters: {
getCounter: (state): number => state.counter getCounter: (state): number => state.counter
}, },
actions: { actions: {
counterIncrease(amount: number) { counterIncrease(amount: number) {
this.counter += amount this.counter += amount
} }
} }
}) })
+6 -6
View File
@@ -1,13 +1,13 @@
import { shell } from 'electron' import { shell } from 'electron'
export default class Utils { export default class Utils {
static getCurrentLocale(): string { static getCurrentLocale(): string {
return navigator?.language?.split('-')[0] || 'en' return navigator?.language?.split('-')[0] || 'en'
} }
static async openExternal(url: string): Promise<void> { static async openExternal(url: string): Promise<void> {
await shell.openExternal(url) await shell.openExternal(url)
} }
} }
export const { getCurrentLocale, openExternal } = Utils export const { getCurrentLocale, openExternal } = Utils
+26 -26
View File
@@ -1,28 +1,28 @@
{ {
"compilerOptions": { "compilerOptions": {
"baseUrl": "./", "baseUrl": "./",
"outDir": "./dist", "outDir": "./dist",
"target": "esnext", "target": "esnext",
"module": "esnext", "module": "esnext",
"moduleResolution": "node", "moduleResolution": "node",
"jsx": "preserve", "jsx": "preserve",
"noImplicitAny": false, "noImplicitAny": false,
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"declaration": true, "declaration": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"esModuleInterop": true, "esModuleInterop": true,
"sourceMap": true, "sourceMap": true,
"strict": true, "strict": true,
"skipLibCheck": true, "skipLibCheck": true,
"paths": { "paths": {
"@/*": ["./src/*"] "@/*": ["./src/*"]
}, },
"lib": ["esnext", "dom"] "lib": ["esnext", "dom"]
}, },
"include": ["src/**/*/*.ts", "src/**/*/*.d.ts", "src/**/*/*.tsx", "src/**/*/*.vue"], "include": ["src/**/*/*.ts", "src/**/*/*.d.ts", "src/**/*/*.tsx", "src/**/*/*.vue"],
"references": [ "references": [
{ {
"path": "./tsconfig.node.json" "path": "./tsconfig.node.json"
} }
] ]
} }
+10 -10
View File
@@ -1,12 +1,12 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "esnext", "target": "esnext",
"module": "esnext", "module": "esnext",
"jsx": "preserve", "jsx": "preserve",
"moduleResolution": "node", "moduleResolution": "node",
"composite": true, "composite": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"allowSyntheticDefaultImports": true "allowSyntheticDefaultImports": true
}, },
"include": ["package.json"] "include": ["package.json"]
} }
+58 -58
View File
@@ -13,62 +13,62 @@ import { builtinModules } from 'module'
rmSync('dist', { recursive: true, force: true }) rmSync('dist', { recursive: true, force: true })
export default defineConfig({ export default defineConfig({
define: { define: {
__VUE_I18N_FULL_INSTALL__: true, __VUE_I18N_FULL_INSTALL__: true,
__VUE_I18N_LEGACY_API__: false, __VUE_I18N_LEGACY_API__: false,
__INTLIFY_PROD_DEVTOOLS__: false __INTLIFY_PROD_DEVTOOLS__: false
}, },
resolve: { resolve: {
extensions: ['.mjs', '.js', '.ts', '.vue', '.json', '.scss'], extensions: ['.mjs', '.js', '.ts', '.vue', '.json', '.scss'],
alias: { alias: {
'@': resolve(dirname(fileURLToPath(import.meta.url)), 'src') '@': resolve(dirname(fileURLToPath(import.meta.url)), 'src')
} }
}, },
base: './', base: './',
root: resolve('./src/renderer'), root: resolve('./src/renderer'),
publicDir: resolve('./src/renderer/public'), publicDir: resolve('./src/renderer/public'),
clearScreen: false, clearScreen: false,
build: { build: {
assetsDir: '', // See: https://github.com/electron-vite/electron-vite-vue/issues/287 assetsDir: '', // See: https://github.com/electron-vite/electron-vite-vue/issues/287
outDir: resolve('./dist') outDir: resolve('./dist')
}, },
plugins: [ plugins: [
vue(), vue(),
vueJsx(), vueJsx(),
// Docs: https://github.com/vuetifyjs/vuetify-loader // Docs: https://github.com/vuetifyjs/vuetify-loader
vuetifyPlugin({ vuetifyPlugin({
autoImport: true autoImport: true
}), }),
// Docs: https://github.com/gxmari007/vite-plugin-eslint // Docs: https://github.com/gxmari007/vite-plugin-eslint
eslintPlugin(), eslintPlugin(),
// Docs: https://github.com/electron-vite/vite-plugin-electron // Docs: https://github.com/electron-vite/vite-plugin-electron
electronPlugin([ electronPlugin([
{ {
entry: ['src/preload/index.ts'], entry: ['src/preload/index.ts'],
vite: { vite: {
build: { build: {
outDir: 'dist/preload' outDir: 'dist/preload'
} }
} }
}, },
{ {
entry: ['src/main/index.ts'], entry: ['src/main/index.ts'],
onstart: (options) => { onstart: (options) => {
options.startup(['.', '--no-sandbox']) options.startup(['.', '--no-sandbox'])
}, },
vite: { vite: {
build: { build: {
assetsDir: '.', assetsDir: '.',
outDir: 'dist/main', outDir: 'dist/main',
rollupOptions: { rollupOptions: {
external: ['electron', ...builtinModules] external: ['electron', ...builtinModules]
} }
} }
} }
} }
]), ]),
rendererPlugin({ rendererPlugin({
nodeIntegration: true nodeIntegration: true
}) })
] ]
}) })