modernweb-dev / web

Guides, tools and libraries for modern web development.
https://modern-web.dev
MIT License
2.22k stars 291 forks source link

@web/test-server Failed to resolve module with dynamic import(/* webpackChunkName: "test" */ "test") #1684

Open amitdhiman000 opened 3 years ago

amitdhiman000 commented 3 years ago

Failed to resolve dynamic import inside test cases, when we add comment inside dynamic import call. e.g. import(/* webpackChunkName: "test" */ "@xmldom/xmldom") call.

TypeError: Failed to resolve module specifier '@xmldom/xmldom'
        at src/index.ts:4:26
        at Generator.next (<anonymous>)
        at dist/src/index.js:7:71
        at new Promise (<anonymous>)
        at __awaiter (dist/src/index.js:3:12)
        at findNodeValue (dist/src/index.js:11:12)
        at src/index.spec.ts:11:20
        at Generator.next (<anonymous>)
        at dist/src/index.spec.js:7:71
        at new Promise (<anonymous>)

repo link

Steps

npm run install
npm run test
bennypowers commented 3 years ago

Can you provide your config?

amitdhiman000 commented 3 years ago

@bennypowers

sample repo link