Next.js plugin to transpile code from node_modules. Please see: https://github.com/martpie/next-transpile-modules/issues/291
1.13k
stars
85
forks
source link
Transpiled module imports dependency as async when it has a nested dependency with {type: "module"} #242
Closed
ewnd9 closed 2 years ago
Are you trying to transpile a local package or an npm package?
Originally caught it with
tslib
inside dependency graph, minimal repro is below πDescribe the bug
next.config.js
:import graph:
a-2
is treated as async import insidea-1
and returns promise, but importing from the app directly works correctly.To Reproduce
https://github.com/ewnd9/next-transpile-modules-repro
Expected behavior
Should be treated as static import
Setup
next@12.0.1
next-transpile-modules@9.0.0
node@14.17.3
yarn@1.22.10