samrum / vite-plugin-web-extension

A vite plugin for generating cross browser platform, ES module based web extensions.
MIT License
331 stars 32 forks source link

remove incorrect rollup types and bump vite #83

Closed DetachHead closed 1 year ago

DetachHead commented 1 year ago

fixes #82

also bump vite to fix another type error, seems to be the same issue as https://github.com/Subwaytime/vite-aliases/issues/36

samrum commented 1 year ago

This is missing the associated changes to pnpm-lock.yaml for the Vite version change.

But, if the intention is to fix downstream usages of the plugin, you might want to update the Vite version in https://github.com/samrum/create-vite-plugin-web-extension instead.

If the intention is to fix type issues in the plugin itself, you'd need to commit the updated pnpm-lock-yaml here.

DetachHead commented 1 year ago

This is missing the associated changes to pnpm-lock.yaml for the Vite version change.

sorry about that, i couldn't because pnpm doesn't work on my work PC. i've updated it now

DetachHead commented 1 year ago

no idea why but the errors in the CI are different to the errors i get locally:

ci

 > tsc --noEmit && rollup -c

src/manifestParser/manifestParser.ts:304:15 - error TS2339: Property 'viteMetadata' does not exist on type 'OutputChunk'.

304     chunkInfo.viteMetadata.importedCss.forEach(metadata.css.add, metadata.css);
                  ~~~~~~~~~~~~

src/manifestParser/manifestParser.ts:305:15 - error TS2339: Property 'viteMetadata' does not exist on type 'OutputChunk'.

305     chunkInfo.viteMetadata.importedAssets.forEach(
                  ~~~~~~~~~~~~

Found 2 errors in the same file, starting at: src/manifestParser/manifestParser.ts:304

local

> tsc --noEmit && rollup -c

src/manifestParser/manifestParser.ts:304:5 - error TS18048: 'chunkInfo.viteMetadata' is possibly 'undefined'.

304     chunkInfo.viteMetadata.importedCss.forEach(metadata.css.add, metadata.css);
        ~~~~~~~~~~~~~~~~~~~~~~

src/manifestParser/manifestParser.ts:305:5 - error TS18048: 'chunkInfo.viteMetadata' is possibly 'undefined'.

305     chunkInfo.viteMetadata.importedAssets.forEach(
        ~~~~~~~~~~~~~~~~~~~~~~

Found 2 errors in the same file, starting at: src/manifestParser/manifestParser.ts:304

i fixed it in f57d89147ac84e639a5ed3fdb480835733f4ead2 but i think something else is going on because tsc in the ci can't seem to find node_modules/vite/types/metadata.d.ts at all

DetachHead commented 1 year ago

i think it was an issue with the lockfile should be fixed now