beyonk-group / google-fonts-webpack-plugin

47 stars 24 forks source link

Webpack 5 Support #12

Closed jaredcat closed 3 years ago

jaredcat commented 3 years ago

webpack 5 build throws this warning

(node:18764) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_PUSH] DeprecationWarning: chunk.files was changed from Array to Set (using Array method 'push' is deprecated)
    at Set.set.push (\node_modules\webpack\lib\util\deprecation.js:108:3)
    at addFile (\node_modules\@beyonk\google-fonts-webpack-plugin\src\index.js:135:38)
    at \node_modules\@beyonk\google-fonts-webpack-plugin\src\index.js:142:21
    at processTicksAndRejections (node:internal/process/task_queues:93:5)
antony commented 3 years ago

I don't use Webpack any more, but happy to review a PR if somebody wants to add Webpack 5 support.

dakur commented 3 years ago

Looks like simply changing push() to add() would resolve the issue. I made a PR #13

dakur commented 3 years ago

@antony Can you take look at it please?