mirror of
https://github.com/chenasraf/nextcloud-autocurrency.git
synced 2026-05-17 17:28:06 +00:00
chore: update build process
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,8 +9,6 @@
|
||||
|
||||
/node_modules/
|
||||
/dist
|
||||
/js
|
||||
/css
|
||||
.DS_Store
|
||||
build/
|
||||
tsconfig.app.tsbuildinfo
|
||||
|
||||
0
js/.gitkeep
Normal file
0
js/.gitkeep
Normal file
@@ -1,5 +1,6 @@
|
||||
import { createAppConfig } from '@nextcloud/vite-config'
|
||||
import path from 'path'
|
||||
import path from 'node:path'
|
||||
import { existsSync, rmSync } from 'node:fs'
|
||||
import { visualizer } from 'rollup-plugin-visualizer'
|
||||
import checker from 'vite-plugin-checker'
|
||||
|
||||
@@ -37,6 +38,7 @@ export default createAppConfig(
|
||||
user: path.resolve(path.join('src', 'user.ts')),
|
||||
},
|
||||
{
|
||||
emptyOutputDirectory: false,
|
||||
config: {
|
||||
root: 'src',
|
||||
resolve: {
|
||||
@@ -46,6 +48,17 @@ export default createAppConfig(
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
{
|
||||
name: 'clean-dist-js',
|
||||
generateBundle() {
|
||||
for (const dir of ['dist/js', 'dist/css']) {
|
||||
const p = path.resolve(__dirname, dir)
|
||||
if (existsSync(p)) {
|
||||
rmSync(p, { recursive: true })
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
checker({
|
||||
vueTsc: true,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user