pack: do not include ts file after build
This commit is contained in:
1 parent
e1a9d04819
commit
4836fbeb7d
2 files changed
+9
-4
No files matched your search
@@ -17,8 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
'dist/**/*',
|
'dist/**/*',
|
||||||
'!docs/**/*',
|
'!docs/**/*',
|
||||||
'!dist/release/**/*',
|
'!dist/release/**/*'
|
||||||
'!dist/main/index.ts'
|
|
||||||
],
|
],
|
||||||
mac: {
|
mac: {
|
||||||
bundleVersion: '1.0',
|
bundleVersion: '1.0',
|
||||||
|
|||||||
+8
-2
@@ -39,15 +39,21 @@ export default defineConfig({
|
|||||||
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.js'],
|
||||||
|
vite: {
|
||||||
|
build: {
|
||||||
|
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: {
|
||||||
publicDir: resolve('./src/main'),
|
|
||||||
build: {
|
build: {
|
||||||
emptyOutDir: true,
|
|
||||||
assetsDir: '.',
|
assetsDir: '.',
|
||||||
outDir: 'dist/main',
|
outDir: 'dist/main',
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
|
|||||||
Reference in new issue
Block a user