Skip to content

Commit

Permalink
fix(nuxt): load required styles when not using CSS or SASS bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitano committed Jan 17, 2023
1 parent 15dfda7 commit 452e3f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 1 addition & 4 deletions packages/nuxt/playground/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@ import GitsUIModule from '..';
export default defineNuxtConfig({
modules: [GitsUIModule, '@nuxtjs/tailwindcss'],
ssr: false,
gitsUi: {
css: true,
sass: false,
},
gitsUi: {},
});
7 changes: 7 additions & 0 deletions packages/nuxt/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,13 @@ export default defineNuxtModule<ModuleOptions>({
nuxt.options.css.push('@gits-id/ui/styles.scss');
}

// load required styles when not using css bundle and not using sass bundle
if (!options.css && !options.sass) {
nuxt.options.css.push('@gits-id/menu/dist/style.css');
nuxt.options.css.push('@gits-id/tooltip/dist/style.css');
nuxt.options.css.push('@gits-id/theme/transition.css');
}

// load floating-vue styles
if (options.loadFloatingVueStyles) {
nuxt.options.css.push('floating-vue/dist/style.css');
Expand Down

0 comments on commit 452e3f9

Please sign in to comment.