Skip to content

Commit 2b9999d

Browse files
committed
fix playground workspace
1 parent f800252 commit 2b9999d

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"exports": {
2424
".": {
2525
"import": "./dist/module.mjs",
26-
"require": "./dist/module.cjs"
26+
"require": "./dist/module.cjs",
27+
"types": "./dist/module.d.ts"
2728
},
2829
"./middleware": {
2930
"import": "./dist/runtime/middleware.mjs",

pnpm-lock.yaml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
packages:
2-
- playground/*
2+
- playground

src/module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ export default defineNuxtModule<ModuleOptions>({
3737
},
3838
setup(options, nuxt) {
3939
const runtimeDir = fileURLToPath(new URL('./runtime', import.meta.url))
40-
nuxt.options.build.transpile.push(runtimeDir, '#build/proxy-handler')
40+
nuxt.options.build.transpile.push(runtimeDir, 'nuxt-proxy', 'nuxt-proxy/middleware')
4141

4242
// Final resolved configuration
4343
const finalConfig = (nuxt.options.runtimeConfig.proxy = defu(nuxt.options.runtimeConfig.proxy, options)) as ModuleOptions
4444

4545
if (Array.isArray(finalConfig.options)) {
4646
finalConfig.options.forEach((options) => {
47-
const filename = `proxy/${hash(objectHash(options))}.ts`
47+
const filename = `proxy/handler_${hash(objectHash(options))}.ts`
4848
createProxyMiddleware(nuxt.options.buildDir, filename, options)
4949
})
5050
}

0 commit comments

Comments
 (0)