Skip to content

Commit 1b55b0a

Browse files
committed
chore: update npm dependencies and add floating-ui to externals
1 parent 9162d06 commit 1b55b0a

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

packages/nuxt/build.config.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
import {defineBuildConfig} from 'unbuild';
1+
import { defineBuildConfig } from 'unbuild';
22

33
export default defineBuildConfig({
4-
externals: ['@nuxt/devtools-kit'],
4+
failOnWarn: false,
5+
externals: [
6+
'@nuxt/devtools-kit',
7+
'floating-vue',
8+
'@floating-ui/dom',
9+
'@floating-ui/core',
10+
'@floating-ui/utils'
11+
],
512
});

packages/nuxt/src/module.ts

+21
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ import {
66
addComponent,
77
type AddComponentOptions,
88
logger,
9+
installModule,
910
} from '@nuxt/kit';
1011
import { addCustomTab } from '@nuxt/devtools-kit';
12+
import FloatingVue from 'floating-vue';
1113

1214
const transpile = [
1315
'@headlessui/vue',
@@ -16,6 +18,9 @@ const transpile = [
1618
'@morpheme/utils',
1719
'@morpheme/design-tokens',
1820
'floating-vue',
21+
'@floating-ui/dom',
22+
'@floating-ui/core',
23+
'@floating-ui/utils'
1924
];
2025

2126
const optimizeDeps = [
@@ -752,6 +757,22 @@ export default defineNuxtModule<ModuleOptions>({
752757
nuxt.options.build.transpile.push(runtimeDir);
753758
addPlugin(resolve(runtimeDir, 'plugin'));
754759

760+
// install floating-vue
761+
// installModule('floating-vue/nuxt')
762+
763+
// FloatingVue.options.themes = {
764+
// 'tooltip-black': {
765+
// $extend: 'tooltip',
766+
// $resetCss: true,
767+
// disposeTimeout: 100000,
768+
// },
769+
// 'tooltip-white': {
770+
// $extend: 'tooltip',
771+
// $resetCss: true,
772+
// disposeTimeout: 100000,
773+
// },
774+
// }
775+
755776
// transpile deps
756777
if (options.transpileDeps) {
757778
nuxt.options.build.transpile = [

0 commit comments

Comments
 (0)