This shows how to apply this PR by @101arrowz to enable manifest v3 support. Please be aware that the patch is not production ready and might still have some issues.
Go to your project and add patch-package and postinstall-postinstall as devDependencies, then download the patch:
cd <path-to-your-project>
npm install -D patch-package
npm install -D postinstall-postinstall
mkdir patches
cd patches
# download the patch file, eg. via curl
curl -L -O https://gist.githubusercontent.com/irgendwr/09bfa9af38d6ef42572c0bbddd813242/raw/@parcel+transformer-webextension+2.4.0.patch
cd ..Add this to your package.json or append the postinstall line to your existing scripts section:
"scripts": {
"postinstall": "patch-package"
},Now, npm install should apply the patch.
This describes how to build, patch parcel and use the patched version somewhere else.
Clone parcel:
git clone https://github.com/parcel-bundler/parcel.git
cd parcelApply the patch. In this case I'll apply the pull-request parcel-bundler/parcel#7050.
git remote add 101arrowz https://github.com/101arrowz/parcel.git
git fetch 101arrowz
git checkout 101arrowz/v2Build (this requires node, yarn and rustup; see this):
yarn install
yarn build-native-release
yarn buildCopy the required module, eg. @parcel/transformer-webextension:
cp -r packages/transformers/webextension <path-to-your-project>/node_modules/@parcel/transformer-webextensionGo to your project and add patch-package and postinstall-postinstall as devDependencies:
cd <path-to-your-project>
npm install -D patch-package
npm install -D postinstall-postinstallCreate the patch:
npx patch-package @parcel/transformer-webextensionAdd this to your package.json or append the postinstall line to your existing scripts section:
"scripts": {
"postinstall": "patch-package"
},