Closed
Description
Provide environment information
NextJS: 14.0.4
@DuCanhGH/next-pwa: 10.2.0
Link to reproduction - Issues with a link to complete (but minimal) reproduction code help us address them faster
To reproduce
git clone https://github.com/lobehub/lobe-chat
git checkout arvinxx-patch-1
bun run i
npm run build
Describe the bug
ReferenceError: __dirname is not defined
16:33:20.398 | at createContext (file:///vercel/path0/node_modules/@ducanh2912/next-pwa/dist/index.js:1:15434)
16:33:20.398 | at Object.webpack (file:///vercel/path0/node_modules/@ducanh2912/next-pwa/dist/index.js:2:6271)
16:33:20.398 | at Object.webpack (/vercel/path0/node_modules/@next/bundle-analyzer/index.js:23:29)
16:33:20.398 | at getBaseWebpackConfig (/vercel/path0/node_modules/next/dist/build/webpack-config.js:1738:32)
16:33:20.398 | at async Promise.all (index 1)
16:33:20.398 | at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:147:20)
16:33:20.398 | at async webpackBuildImpl (/vercel/path0/node_modules/next/dist/build/webpack-build/impl.js:132:21)
16:33:20.398 | at async webpackBuild (/vercel/path0/node_modules/next/dist/build/webpack-build/index.js:165:16)
16:33:20.398 | at async /vercel/path0/node_modules/next/dist/build/index.js:695:115
16:33:20.398 | at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:147:20)
16:33:20.423 | error: script "build" exited with code 1
16:33:20.427
Expected behavior
build success
Screenshots (if relevant)
Additional information (if relevant)
No response