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

Project cannot be built #11

Closed
Artur- opened this issue Nov 8, 2021 · 4 comments
Closed

Project cannot be built #11

Artur- opened this issue Nov 8, 2021 · 4 comments

Comments

@Artur-
Copy link

Artur- commented Nov 8, 2021

Running yarn build results in

src/plugin.ts:138:14 - error TS2551: Property 'resolveBuiltUrl' does not exist on type 'Plugin'. Did you mean 'resolveFileUrl'?

138         this.resolveBuiltUrl = url => {
                 ~~~~~~~~~~~~~~~

src/plugin.ts:138:32 - error TS7006: Parameter 'url' implicitly has an 'any' type.

138         this.resolveBuiltUrl = url => {
                                   ~~~

src/plugin.ts:168:55 - error TS2571: Object is of type 'unknown'.

168               debug(`Failed to transform "${id}". ` + err.message)
                                                          ~~~

The Object is of type 'unknown' is related to TypeScript 4.4 and easy to fix but what is resolveBuiltUrl supposed to do? It looks like dead code

@aleclarson
Copy link
Contributor

See here #3 (comment)

@Artur-
Copy link
Author

Artur- commented Nov 9, 2021

That says it is fixed in the next branch but that fails in the same way. The code is the same https://github.com/alloc/vite-plugin-compress/blob/next/src/plugin.ts#L133

@aleclarson
Copy link
Contributor

the fix depends on #1675, which I haven't had time to write tests for.

Unfortunately, the next branch depends on an unmerged Vite PR.

@Artur-
Copy link
Author

Artur- commented Nov 10, 2021

Ah, now I see. I guess there is no chance of reverting the change in this plugin until the Vite PR is done so this project could compile?

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