Skip to content

Commit d723e80

Browse files
codebender828pi0
authored andcommitted
chore: update snapshots
1 parent 28de332 commit d723e80

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/module.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { fileURLToPath } from "url";
1+
import { fileURLToPath } from 'url'
22
import {
33
defineNuxtModule,
44
addPlugin,
55
createResolver,
6-
addServerPlugin,
7-
} from "@nuxt/kit";
6+
addServerPlugin
7+
} from '@nuxt/kit'
88

99
declare global {
1010
interface Window {
@@ -15,31 +15,31 @@ declare global {
1515

1616
export default defineNuxtModule({
1717
meta: {
18-
name: "@nuxtjs/emotion",
19-
configKey: "emotion",
20-
compatibilty: ">=3.0.0",
18+
name: '@nuxtjs/emotion',
19+
configKey: 'emotion',
20+
compatibilty: '>=3.0.0'
2121
},
22-
setup(_, nuxt) {
22+
setup (_, nuxt) {
2323
// ensure `nitro.plugins` is initialized
24-
nuxt.options.nitro.plugins = nuxt.options.nitro.plugins || [];
24+
nuxt.options.nitro.plugins = nuxt.options.nitro.plugins || []
2525

26-
nuxt.hook("nitro:config", (config) => {
26+
nuxt.hook('nitro:config', (config) => {
2727
// Prevent inlining emotion (+ the crucial css cache!) in dev mode
2828
if (nuxt.options.dev) {
2929
if (config.externals) {
30-
config.externals.external ||= [];
31-
config.externals.external.push("@emotion/server");
30+
config.externals.external ||= []
31+
config.externals.external.push('@emotion/server')
3232
}
3333
}
34-
});
34+
})
3535

3636
/**
3737
* Register emotion plugin
3838
*/
39-
const { resolve } = createResolver(import.meta.url);
40-
const runtimeDir = fileURLToPath(new URL("./runtime", import.meta.url));
41-
nuxt.options.build.transpile.push(runtimeDir);
42-
addServerPlugin(resolve(runtimeDir, "emotion.server"));
43-
addPlugin(resolve(runtimeDir, "emotion.client"));
44-
},
45-
});
39+
const { resolve } = createResolver(import.meta.url)
40+
const runtimeDir = fileURLToPath(new URL('./runtime', import.meta.url))
41+
nuxt.options.build.transpile.push(runtimeDir)
42+
addServerPlugin(resolve(runtimeDir, 'emotion.server'))
43+
addPlugin(resolve(runtimeDir, 'emotion.client'))
44+
}
45+
})

0 commit comments

Comments
 (0)