Skip to content

Commit

Permalink
fix: remove third party styles from build
Browse files Browse the repository at this point in the history
  • Loading branch information
cafadev committed Jun 19, 2023
1 parent 461a557 commit dbef67a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion demo/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Oruga from '@oruga-ui/oruga-next'
import { defaultCustomization, fields, table, utils } from '../src'
import App from './App.vue'

import '../src/styles/index.sass'
import './styles/main.sass'

axios.defaults.baseURL = 'http://localhost:9000/api/'

Expand Down
6 changes: 6 additions & 0 deletions demo/styles/main.sass
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@

@import '@mdi/font/css/materialdesignicons.css'
@import '@oruga-ui/oruga-next/dist/oruga-full.css'
@import '@fancy-crud/vue/dist/fancy-crud-vue.css'
@import '@/styles/index.sass'

:root
--oruga-variant-danger: red

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"peerDependencies": {
"@fancy-crud/core": "^1.4.0",
"@fancy-crud/vue": "^1.0.0",
"@fancy-crud/vue": "^1.5.2",
"@oruga-ui/oruga-next": "^0.6.0",
"@vueuse/core": "^9.9.0",
"esno": "0.10.0",
Expand All @@ -44,7 +44,7 @@
},
"dependencies": {
"@fancy-crud/core": "^1.4.0",
"@fancy-crud/vue": "^1.0.0",
"@fancy-crud/vue": "^1.5.2",
"@oruga-ui/oruga-next": "^0.6.0",
"@vueuse/core": "^9.9.0",
"esno": "0.10.0",
Expand Down
4 changes: 0 additions & 4 deletions src/styles/index.sass
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@
@tailwind components
@tailwind utilities

@import '@mdi/font/css/materialdesignicons.css'
@import '@oruga-ui/oruga-next/dist/oruga-full.css'
@import '@fancy-crud/vue/dist/fancy-crud-vue.css'

@import './themes/default/common/index.sass'
@import './themes/default/form/index.sass'
6 changes: 6 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ export default defineConfig({
rollupOptions: {
external: ['vue', '@oruga-ui/oruga-next', '@fancy-crud/core', '@fancy-crud/vue'],
output: {
assetFileNames: (assetInfo) => {
if (!assetInfo.name || assetInfo.name === 'style.css')
return 'fancy-crud-oruga-wrapper.css'
return assetInfo.name
},
exports: 'named',
globals: {
vue: 'Vue',
},
Expand Down

0 comments on commit dbef67a

Please sign in to comment.