chore: UPDATE
This commit is contained in:
parent
3210954fac
commit
ad9e8a4937
|
@ -0,0 +1,16 @@
|
||||||
|
|
||||||
|
export {}
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface Window {
|
||||||
|
/** Expose some Api through preload script */
|
||||||
|
bridge: {
|
||||||
|
__dirname: string
|
||||||
|
__filename: string
|
||||||
|
fs: typeof import('fs')
|
||||||
|
path: typeof import('path')
|
||||||
|
ipcRenderer: import('electron').IpcRenderer
|
||||||
|
removeLoading: () => void
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,7 +15,7 @@ function eventHandle(ev: RollupWatcherEvent) {
|
||||||
if (ev.code === 'ERROR') {
|
if (ev.code === 'ERROR') {
|
||||||
console.error(TAG, ev.error)
|
console.error(TAG, ev.error)
|
||||||
} else if (ev.code === 'BUNDLE_START') {
|
} else if (ev.code === 'BUNDLE_START') {
|
||||||
console.log(TAG, `Rebuild start - ${ev.output}`)
|
console.log(TAG, `Rebuild - ${ev.output}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ import { builtinModules } from 'module'
|
||||||
import { RollupOptions } from 'rollup'
|
import { RollupOptions } from 'rollup'
|
||||||
import commonjs from '@rollup/plugin-commonjs'
|
import commonjs from '@rollup/plugin-commonjs'
|
||||||
import { nodeResolve } from '@rollup/plugin-node-resolve'
|
import { nodeResolve } from '@rollup/plugin-node-resolve'
|
||||||
// import typescript from '@rollup/plugin-typescript'
|
import typescript from '@rollup/plugin-typescript'
|
||||||
import swc from 'rollup-plugin-swc'
|
// import swc from 'rollup-plugin-swc'
|
||||||
|
|
||||||
function optionsFactory(options: RollupOptions): RollupOptions {
|
function optionsFactory(options: RollupOptions): RollupOptions {
|
||||||
return {
|
return {
|
||||||
|
@ -15,9 +15,11 @@ function optionsFactory(options: RollupOptions): RollupOptions {
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
commonjs(),
|
commonjs(),
|
||||||
nodeResolve(),
|
nodeResolve({
|
||||||
// typescript(),
|
extensions: ['.ts', '.js', 'json'],
|
||||||
swc(),
|
}),
|
||||||
|
typescript(),
|
||||||
|
// swc(), Error: Cannot find module 'regenerator-runtime'
|
||||||
],
|
],
|
||||||
external: [
|
external: [
|
||||||
'electron',
|
'electron',
|
||||||
|
|
Loading…
Reference in New Issue