Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Error: Invalid glob import syntax: Expect CallExpression, got SequenceExpression #21

Closed
jrson83 opened this issue May 13, 2022 · 4 comments · Fixed by vitejs/vite#8181
Closed

Comments

@jrson83
Copy link

jrson83 commented May 13, 2022

I try to get the plugin working with a fresh clean install of vite-plugin-ssr preact-client-routing-example. Please can you give a helping hand how to get this work. As soon as I add GlobPlugin() to plugins, it's throwing the error. I have setup a repo for reproduction:

https://github.com/jrson83/vite-plugin-glob-preact-example

Error: Invalid glob import syntax: Expect CallExpression, got SequenceExpression
    at err (D:\______jrson.de\preact-client-routing\node_modules\vite-plugin-glob\dist\index.cjs:97:17)
    at D:\______jrson.de\preact-client-routing\node_modules\vite-plugin-glob\dist\index.cjs:115:13
    at Array.map (<anonymous>)
    at parseImportGlob (D:\______jrson.de\preact-client-routing\node_modules\vite-plugin-glob\dist\index.cjs:93:24)
    at transform (D:\______jrson.de\preact-client-routing\node_modules\vite-plugin-glob\dist\index.cjs:208:23)
    at TransformContext.transform (D:\______jrson.de\preact-client-routing\node_modules\vite-plugin-glob\dist\index.cjs:72:28)
    at Object.transform (D:\______jrson.de\preact-client-routing\node_modules\vite\dist\node\chunks\dep-59dc6e00.js:38900:53)
    at async doTransform (D:\______jrson.de\preact-client-routing\node_modules\vite\dist\node\chunks\dep-59dc6e00.js:55857:29
@antfu
Copy link
Owner

antfu commented May 14, 2022

/cc @brillout do you know which line is causing this? A failed unit test would be a great help!

@brillout
Copy link
Contributor

I'll have a look, thanks for the ping.

@brillout
Copy link
Contributor

Done: #22.

@antfu
Copy link
Owner

antfu commented May 15, 2022

Fixed in #22

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 a pull request may close this issue.

3 participants