kktjs / kkt

Create React apps with no build configuration, Cli tool for creating react apps.
https://kktjs.github.io/kkt
MIT License
49 stars 11 forks source link

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default #412

Closed jaywcjlove closed 1 year ago

jaywcjlove commented 1 year ago
Module not found: Error: Can't resolve 'path' in '/home/runner/work/react-color/react-color/node_modules/@babel/core/lib/transformation'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
    - install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "path": false }