Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

fix: set correct clean-css import #103

Merged
merged 1 commit into from
May 22, 2020
Merged

Conversation

przemkow
Copy link
Contributor

Incorrect import cause an error during compilation:

[!] (VuePlugin plugin) TypeError: clean_css_1.default is not a constructor

I tried to use import * as CleanCSS from 'clean-css' but then it was not working correctly in unit tests.

@znck
Copy link
Member

znck commented May 22, 2020

I wonder why tests were passing earlier. Can you add a note (with link to this issue) so we don't repeat the mistake?

@przemkow przemkow force-pushed the fix-incorrect-import branch from b327b20 to 5bade32 Compare May 22, 2020 13:05
@przemkow
Copy link
Contributor Author

I added comment above the import.

This is a very good question. Especially that when the build has the correct syntax test is failing, maybe is something related to ts-jest? I will check it later because it looks pretty interesting if I find something I will let you know :)

@przemkow
Copy link
Contributor Author

ok, it seems it was something related to test runner itself.
After updating Jest to 25.2.3 test from the previous version does not have false-positive result.

I can update Jest in separate PR as there are some types errors in test/baseline.spec.ts and utils.ts which needs to be reviewed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants