vite-plugin-web-extension icon indicating copy to clipboard operation
vite-plugin-web-extension copied to clipboard

change build.rollupOptions.output.entryFileNames throw entrypoint not found error

Open WOSHIZHAZHA120 opened this issue 1 year ago • 3 comments

Summary

cannot change build.rollupOptions.output.entryFileNames

i saw the code just replace the extension name to match output maybe can use facadeModuleId and isEntry attribute to help identify ?

Reproduction

~~https://github.com/WOSHIZHAZHA120/5c122de243419b83f4cc5c2a01dd69a2d91c9dd7~~

Environment


  System:
    OS: Windows 10 10.0.22621
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
    Memory: 6.59 GB / 15.75 GB
  Binaries:
    Node: 19.8.1 - ~\scoop\apps\nodejs\current\node.EXE
    Yarn: 1.22.19 - ~\scoop\apps\yarn\current\bin\yarn.CMD
    npm: 9.5.1 - ~\scoop\apps\nodejs\current\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.1413.0), Chromium (111.0.1661.41)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    vite: ^4.2.0 => 4.2.0
    vite-plugin-web-extension: ^3.0.2 => 3.0.2



WOSHIZHAZHA120 avatar Mar 18 '23 01:03 WOSHIZHAZHA120

I can look into supporting changing the output config, but what reason do you have changing it? It looks like your just trying to obfuscate the files?

The plugin automatically configures the output so it follows all the developer guidelines google puts forth for publishing extensions, so you shouldn't need to configure any output config.

aklinker1 avatar Mar 18 '23 15:03 aklinker1

Yes, I want to obfuscate the files, I'm doing a private extension and want to share it with some people so they can't find the files and code right away.

is this possible ?

WOSHIZHAZHA120 avatar Mar 18 '23 15:03 WOSHIZHAZHA120

Ah I see, that makes sense for a private extension.

I'll look into supporting this. For now, you'll have to write a script that runs after your build that calculates the hashes and renames the files on disk and in the manifest.

aklinker1 avatar Mar 18 '23 16:03 aklinker1