I'm building a Chrome extension and I'm relying on some NPM modules. While I do have webpack to help packaging stuff for production environment, it seems that Chrome takes the entire directory into account when loading my unpacked extension during development, which is roughly 340M
! This also makes debugging and testing a drag because click open the Chrome extension pop up takes 3 ~ 5 seconds.
I've been googling whether there is an option in the manifest.json
file but nothing helpful came up. Did I miss something obvious?
If I hadn't, what is the recommended workflow? Should I output everything into a /dist
folder and have my manifest.json
file there?
You need to place manifest.json
inside your dist
folder instead of the root of your project:
/
|- webpack.config.js
|- package.json
|- node_modules/
+- dist/
|- manifest.json
+- contentscript.js
There's no way to exclude files from a manifest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With