hyperbrew / vite-cep-plugin

A Vite plugin to build Adobe CEP Extension Panels
MIT License
17 stars 17 forks source link

Delete randomly generated zero byte files to pass Adobe Exchange Submission tests #20

Open jomonson opened 1 year ago

justintaylor-dev commented 1 year ago

Can you provide some more context as to why this is important.

wizzymotion commented 1 year ago

Hey @justintaylor-dev. To submit a plugin/extension for distribution through Adobe Exchange, the file goes through an automated approval testing. I suspect that these zero-byte files are causing the Bolt-made extension submissions to be rejected by Adobe.

jomonson commented 1 year ago

Dependencies not at your control such as node modules can introduce files with zero byte size. I tried updating these packages but that didn't help. Eventually as long as Adobe requires that your zxp package contains no zero byte files, this is a must. Maybe you can think of another solution? I think that this requirement in the Adobe Marketplace submission process is new.

justintaylor-dev commented 1 year ago

Have you tried using import instead of require(), this should enable bundling and remove any unused files, which would include zero byte files.

jomonson commented 1 year ago

Not all packages can be imported. For example I use require() for axios, form-data, node-fetch and amazon-cognito-identity-js. If I use import I get the issues written in the README:

If the import syntax fails (typically with modules that use the Node.js runtime) you can resort to the Node.js require() syntax,
jomonson commented 1 year ago

@justintaylor-dev What do you think? Can we merge this? I'd rather not manage my own local copy of this plugin :)