Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support different CleanWebpackPlugin versions #7

Closed
iki opened this issue Sep 25, 2019 · 2 comments
Closed

Support different CleanWebpackPlugin versions #7

iki opened this issue Sep 25, 2019 · 2 comments

Comments

@iki
Copy link

iki commented Sep 25, 2019

API changed with CleanWebpackPlugin v2 and v3.

Zen afaik doesn't detect versions and uses only v1 API.

Using Zen 0.1.30 with CleanWebpackPlugin 2.0.2 throws:

zen error Error: clean-webpack-plugin only accepts an options object. See: https://github.com/johnagan/clean-webpack-plugin#options-and-defaults-optional
    at new CleanWebpackPlugin (.\my-project\node_modules\clean-webpack-plugin\src\clean-webpack-plugin.ts:79:19)
    at createPlugins (.\my-project\node_modules\@larix\zen\src\plugins\WebpackPlugin.ts:74:30)
    at createConfig (.\my-project\node_modules\@larix\zen\src\plugins\WebpackPlugin.ts:294:19)
    at WebpackPlugin.configure (.\my-project\node_modules\@larix\zen\src\plugins\WebpackPlugin.ts:552:50)
    at .\my-project\node_modules\@larix\zen\src\createBuilders.ts:146:62
    at Array.forEach (<anonymous>)
    at _loop_2 (.\my-project\node_modules\@larix\zen\src\createBuilders.ts:146:21)
    at Object.createBuilders [as default] (.\my-project\node_modules\@larix\zen\lib\createBuilders.js:154:9)
    at Object.<anonymous> (.\my-project\node_modules\@larix\zen\src\cli.ts:50:30)
    at Module._compile (internal/modules/cjs/loader.js:777:30)

Using Zen 0.1.30 with CleanWebpackPlugin 3.0.0 throws:

zen error TypeError: CleanWebpackPlugin is not a constructor
    at createPlugins (.\my-project\node_modules\@larix\zen\src\plugins\WebpackPlugin.ts:74:30)
    at createConfig (.\my-project\node_modules\@larix\zen\src\plugins\WebpackPlugin.ts:294:19)
    at WebpackPlugin.configure (.\my-project\node_modules\@larix\zen\src\plugins\WebpackPlugin.ts:552:50)
    at .\my-project\node_modules\@larix\zen\src\createBuilders.ts:146:62
    at Array.forEach (<anonymous>)
    at _loop_2 (.\my-project\node_modules\@larix\zen\src\createBuilders.ts:146:21)
    at Object.createBuilders [as default] (.\my-project\node_modules\@larix\zen\lib\createBuilders.js:154:9)
    at Object.<anonymous> (.\my-project\node_modules\@larix\zen\src\cli.ts:50:30)
    at Module._compile (internal/modules/cjs/loader.js:777:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:788:10)
@larixer
Copy link
Member

larixer commented Sep 25, 2019

@iki Thank you for the issue report. Would you like to submit the pull request to fix this issue?

@larixer
Copy link
Member

larixer commented Apr 11, 2021

Fixed in #23 @larix/zen@0.1.36

@larixer larixer closed this as completed Apr 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants