Skip to content

Commit 42f7399

Browse files
committed
fix: await import of remove logs
1 parent 9a53133 commit 42f7399

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nuxt-security",
3-
"version": "1.0.0-rc.1",
3+
"version": "1.0.0-rc.2",
44
"license": "MIT",
55
"type": "module",
66
"homepage": "https://nuxt-security.vercel.app",

src/module.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { resolve, normalize } from 'pathe'
33
import { defineNuxtModule, addServerHandler, installModule, addVitePlugin } from '@nuxt/kit'
44
import { defu } from 'defu'
55
import { Nuxt, RuntimeConfig } from '@nuxt/schema'
6+
import viteRemove from 'unplugin-remove/vite'
67
import { defuReplaceArray } from './utils'
78
import {
89
ModuleOptions,
@@ -54,8 +55,6 @@ export default defineNuxtModule<ModuleOptions>({
5455
if (!securityOptions.enabled) { return }
5556

5657
if (securityOptions.removeLoggers) {
57-
// ViteRemove does not come with a proper TS declaration
58-
const viteRemove = await import('unplugin-remove/vite') as unknown as (options: any) => any
5958
addVitePlugin(viteRemove(securityOptions.removeLoggers))
6059
}
6160

0 commit comments

Comments
 (0)