How to use node modules for a (Firefox) web extension with ParcelJS #8943
Unanswered
odebroqueville
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I created a web extension with the following folder structure:
It namely contains an options.html file which includes the following line of code:
<script type="module" src="./scripts/options.js"></script>
Then, options.js includes the following import statement:
import Sortable from 'sortablejs';
where sortablejs is a node module contained within the node_modules folder. Yet, when I type npm run build, the resulting dist folder contains no trace of the sortablejs node module:
In addition, the fonts inside the fonts folder are being duplicated with a hash.
My package.json file namely contains the following:
Finally, the files bookmarks.html, history.html and defaultSearchEngines.json are all also missing in the dist folder. Do these files need to be placed in the src folder?
Beta Was this translation helpful? Give feedback.
All reactions