Skip to content

Commit

Permalink
chore(vite): moved vite configs
Browse files Browse the repository at this point in the history
  • Loading branch information
gearonix committed Sep 1, 2023
1 parent d801bc2 commit 4fb3637
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 194 deletions.
2 changes: 1 addition & 1 deletion apps/client/.config/vite/entry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// It is important to specify relative paths here.
import { createViteConfig } from '../../../libs/config/src/vite'
import { createViteConfig } from '../../../../libs/config/src/vite'

import { resolve } from 'path'
import { buildCustomPlugins } from './plugins'
Expand Down
2 changes: 1 addition & 1 deletion apps/client/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"options": {
"outputPath": "dist/apps/client",
"skipTypeCheck": true,
"configFile": "apps/client/src/vite.config.ts"
"configFile": "apps/client/.config/vite/entry.ts"
},
"configurations": {
"development": {
Expand Down
35 changes: 0 additions & 35 deletions apps/client/src/vite.config.ts

This file was deleted.

2 changes: 1 addition & 1 deletion libs/config/src/vite/builders/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const defineBuildOptions = (
return {
lib: {
entry: 'src/index.ts',
name: 'client-shared',
name: options.projectName,
fileName: 'index',
formats: ['es', 'cjs']
},
Expand Down
22 changes: 22 additions & 0 deletions libs/web/editor/.config/vite.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// It is important to specify relative paths here.
import { createViteConfig } from '../../../../libs/config/src/vite'

import { resolve } from 'path'
import react from '@vitejs/plugin-react'
import dynamicImport from 'vite-plugin-dynamic-import'

export default createViteConfig({
projectName: 'editor',
projectType: 'library',
rootDir: resolve(__dirname, '..'),
layer: 'third',
external: [
'antd',
'react-router-dom',
'react-smooth-scrollbar'
],
plugins: [
react(),
dynamicImport()
]
})
3 changes: 2 additions & 1 deletion libs/web/editor/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"defaultConfiguration": "production",
"options": {
"outputPath": "dist/libs/web/editor",
"skipTypeCheck": true
"skipTypeCheck": true,
"configFile": "libs/web/editor/.config/vite.ts"
},
"configurations": {
"development": {
Expand Down
1 change: 1 addition & 0 deletions libs/web/editor/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './app'
53 changes: 0 additions & 53 deletions libs/web/editor/vite.config.ts

This file was deleted.

20 changes: 20 additions & 0 deletions libs/web/shared/.config/vite.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// It is important to specify relative paths here.
import { createViteConfig } from '../../../../libs/config/src/vite'

import { resolve } from 'path'
import react from '@vitejs/plugin-react'

export default createViteConfig({
projectName: 'web-shared',
projectType: 'library',
rootDir: resolve(__dirname, '..'),
layer: 'third',
external: [
'react-smooth-scrollbar',
'antd',
'react-router-dom',
],
plugins: [
react(),
]
})
3 changes: 2 additions & 1 deletion libs/web/shared/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"options": {
"outputPath": "dist/libs/web/shared",
"skipTypeCheck": true,
"fix": true
"fix": true,
"configFile": "libs/web/shared/.config/vite.ts"
},
"configurations": {
"development": {
Expand Down
47 changes: 0 additions & 47 deletions libs/web/shared/vite.config.ts

This file was deleted.

19 changes: 19 additions & 0 deletions libs/web/ui/.config/vite.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// It is important to specify relative paths here.
import { createViteConfig } from '../../../../libs/config/src/vite'

import { resolve } from 'path'
import react from '@vitejs/plugin-react'

export default createViteConfig({
projectName: 'shared',
projectType: 'library',
rootDir: resolve(__dirname, '..'),
layer: 'third',
external: [
'react-smooth-scrollbar',
'antd'
],
plugins: [
react(),
]
})
3 changes: 2 additions & 1 deletion libs/web/ui/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
"defaultConfiguration": "production",
"options": {
"outputPath": "dist/libs/web/ui",
"skipTypeCheck": true
"skipTypeCheck": true,
"configFile": "libs/web/ui/.config/vite.ts"
},
"configurations": {
"development": {
Expand Down
53 changes: 0 additions & 53 deletions libs/web/ui/vite.config.ts

This file was deleted.

0 comments on commit 4fb3637

Please sign in to comment.