mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-31 20:16:36 +08:00
chore: update
This commit is contained in:
parent
c7e6cd6db8
commit
26c6240451
@ -47,7 +47,9 @@
|
||||
"vue": "^3.0.0-rc.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-alias": "^3.1.1",
|
||||
"@rollup/plugin-commonjs": "^15.0.0",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^9.0.0",
|
||||
"@vue/compiler-sfc": "^3.0.0-rc.8",
|
||||
"chalk": "^4.1.0",
|
||||
|
@ -2,6 +2,8 @@ const path = require('path')
|
||||
const { nodeResolve } = require('@rollup/plugin-node-resolve')
|
||||
const commonjs = require('@rollup/plugin-commonjs')
|
||||
const esbuild = require('rollup-plugin-esbuild')
|
||||
const alias = require('@rollup/plugin-alias')
|
||||
const json = require('@rollup/plugin-json')
|
||||
|
||||
module.exports = (env = 'production') => {
|
||||
return {
|
||||
@ -13,8 +15,9 @@ module.exports = (env = 'production') => {
|
||||
sourcemap: true,
|
||||
},
|
||||
plugins: [
|
||||
nodeResolve(),
|
||||
nodeResolve({ jsnext: true, preferBuiltins: true, browser: true }), // 消除碰到 node.js 模块时⚠警告
|
||||
commonjs(),
|
||||
json(),
|
||||
esbuild({
|
||||
// All options are optional
|
||||
include: /\.[jt]sx?$/, // default, inferred from `loaders` option
|
||||
@ -36,9 +39,27 @@ module.exports = (env = 'production') => {
|
||||
'.json': 'json',
|
||||
// Enable JSX in .js files too
|
||||
'.js': 'jsx'
|
||||
}
|
||||
},
|
||||
}),
|
||||
alias({
|
||||
entries: [
|
||||
{ find: '@main', replacement: path.join(__dirname, '../src/main'), },
|
||||
]
|
||||
})
|
||||
],
|
||||
external: [
|
||||
'crypto',
|
||||
'assert',
|
||||
'fs',
|
||||
'util',
|
||||
'os',
|
||||
'events',
|
||||
'child_process',
|
||||
'http',
|
||||
'https',
|
||||
'path',
|
||||
'electron',
|
||||
'electron-is-dev',
|
||||
],
|
||||
external: ['fs', 'path', 'electron', 'electron-is-dev'],
|
||||
}
|
||||
}
|
||||
|
@ -116,6 +116,13 @@
|
||||
"@nodelib/fs.scandir" "2.1.3"
|
||||
fastq "^1.6.0"
|
||||
|
||||
"@rollup/plugin-alias@^3.1.1":
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-3.1.1.tgz#bb96cf37fefeb0a953a6566c284855c7d1cd290c"
|
||||
integrity sha512-hNcQY4bpBUIvxekd26DBPgF7BT4mKVNDF5tBG4Zi+3IgwLxGYRY0itHs9D0oLVwXM5pvJDWJlBQro+au8WaUWw==
|
||||
dependencies:
|
||||
slash "^3.0.0"
|
||||
|
||||
"@rollup/plugin-commonjs@^14.0.0":
|
||||
version "14.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-14.0.0.tgz#4285f9ec2db686a31129e5a2b415c94aa1f836f0"
|
||||
@ -142,7 +149,7 @@
|
||||
magic-string "^0.25.7"
|
||||
resolve "^1.17.0"
|
||||
|
||||
"@rollup/plugin-json@^4.0.3":
|
||||
"@rollup/plugin-json@^4.0.3", "@rollup/plugin-json@^4.1.0":
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.1.0.tgz#54e09867ae6963c593844d8bd7a9c718294496f3"
|
||||
integrity sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==
|
||||
|
Loading…
x
Reference in New Issue
Block a user