I am currently experimenting with React/Redux with WebExtensions after seeing this article.
https://hacks.mozilla.org/2017/06/introducing-filterbubbler-a-webextension-built-using-reactredux/
Just have a few questions about the “best practices” for use of libraries (might be useful for other people thinking the same).
I know that certain libraries will be excluded from review if their hash matches with these like React and ReactDOM.
So what I have done was got those minified libraries of React/React DOM and put them in a script tag and adding
externals: {
// "node/npm module name": "name of exported library variable"
"react": "React",
"react-dom": "ReactDOM"
},
to the webpack config so it doesn’t import those libraries in the bundled file.
Now that just leaves with the other libraries like redux, redux-webext, etc.
So what would be a good way to bundle the rest of the libraries for the sake of a easier review?
- Do the same thing as React/React Dom
- Bundle application code and library code together (1 file)
- Separate bundles for application code and library code (2 files)