unplugin icon indicating copy to clipboard operation
unplugin copied to clipboard

Webpack 5 build errors with persistent/disk cache

Open Akryum opened this issue 4 years ago • 6 comments
trafficstars

Reproduction link: https://github.com/Akryum/unplugin-icons-issue-94

  1. Build a webpack 5 project with persistent caching -> Success
  2. Build again -> Success
  3. Build again -> Error

The build crashes with errors - examples:

 error  in ./virtual:~icons/feather/smile

Syntax Error: no such file or directory, open '/home/akryum/Projects/livestorm-app/packages/frontend/virtual:~icons/feather/smile'


 error  in ./virtual:~icons/feather/x-circle

Syntax Error: no such file or directory, open '/home/akryum/Projects/livestorm-app/packages/frontend/virtual:~icons/feather/x-circle'


 error  in ./virtual:~icons/feather/x

Syntax Error: no such file or directory, open '/home/akryum/Projects/livestorm-app/packages/frontend/virtual:~icons/feather/x'

Related to https://github.com/antfu/unplugin-icons/issues/94

Akryum avatar Oct 12 '21 12:10 Akryum

Commenting the load part of the unplugin plugin (here) makes the error go away. So the issue is probably related to load.

Akryum avatar Oct 12 '21 12:10 Akryum

So when the error happens, resolveId is not called and then plugin.__vfsModules doesn't have the virtual module so it fails.

Akryum avatar Oct 12 '21 12:10 Akryum

Maybe related to https://github.com/sysgears/webpack-virtual-modules/issues/76

Akryum avatar Oct 12 '21 12:10 Akryum

Looks like there is an open PR: https://github.com/sysgears/webpack-virtual-modules/pull/128

Akryum avatar Nov 30 '21 14:11 Akryum

https://github.com/sysgears/webpack-virtual-modules/pull/164 It looks like fixed with [email protected] but I still got the error with vercel build: image

yunsii avatar Aug 09 '23 12:08 yunsii

Since the upstream issue is resolved, we can close this issue?

adarshmadrecha avatar Oct 01 '23 15:10 adarshmadrecha