fix: rollback to parcel 2.8.2 for production build

This commit is contained in:
Michal Szczepanski 2023-07-02 10:49:03 +02:00
parent e9a4190616
commit 020baafab7
7 changed files with 24663 additions and 986 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
.DS_Store
.parcel-cache
parcel-bundle-reports
dist
node_modules
tmp

View File

@ -1,3 +1,11 @@
#!/bin/bash
export NODE_ENV=production
npm run prod
# swap manifests
mv src/manifest.json src/manifest.dev.json
mv src/manifest.ch.json src/manifest.json
# build
npm run prod
# swap manifests back
mv src/manifest.json src/manifest.ch.json
mv src/manifest.dev.json src/manifest.json

View File

@ -1,10 +1,10 @@
#!/bin/bash
export NODE_ENV=production
# swap manifests
mv src/manifest.json src/manifest.ch.json
mv src/manifest.json src/manifest.dev.json
mv src/manifest.ff.json src/manifest.json
# build
npm run prod:ff
# swap manifests back
mv src/manifest.json src/manifest.ff.json
mv src/manifest.ch.json src/manifest.json
mv src/manifest.dev.json src/manifest.json

25570
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,11 +6,11 @@
"private": true,
"author": "Michal Szczepanski <michal@vane.pl>",
"scripts": {
"dev": "parcel watch src/manifest.json --host localhost --target pinmenote-dev --no-cache",
"dev:ff": "parcel build src/manifest.json --target pinmenote-firefox-dev --no-cache",
"dev": "parcel watch src/manifest.json --host localhost --target pinmenote-dev",
"dev:ff": "parcel build src/manifest.json --target pinmenote-firefox-dev",
"build": "npm run prod && npm run prod:ff",
"prod": "parcel build src/manifest.json --target pinmenote-prod --no-cache",
"prod:ff": "parcel build src/manifest.json --target pinmenote-firefox-prod --no-cache",
"prod": "parcel build src/manifest.json --target pinmenote-prod --log-level verbose --no-cache --reporter @parcel/reporter-bundle-analyzer",
"prod:ff": "parcel build src/manifest.json --target pinmenote-firefox-prod --log-level verbose --no-cache --reporter @parcel/reporter-bundle-analyzer",
"lint": "eslint --ext .ts,.tsx src/",
"lint:fix": "eslint --ext .ts,.tsx src/ --fix"
},
@ -30,9 +30,10 @@
}
},
"devDependencies": {
"@parcel/compressor-gzip": "^2.9.3",
"@parcel/config-webextension": "^2.9.3",
"@parcel/transformer-typescript-tsc": "^2.9.3",
"@parcel/compressor-gzip": "^2.8.2",
"@parcel/config-webextension": "^2.8.2",
"@parcel/reporter-bundle-analyzer": "^2.8.2",
"@parcel/transformer-typescript-tsc": "^2.8.2",
"@types/chrome": "^0.0.239",
"@types/firefox-webext-browser": "^111.0.1",
"@types/marked": "^4.0.8",
@ -49,7 +50,7 @@
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"parcel": "^2.9.3",
"parcel": "^2.8.2",
"pre-commit": "^1.2.2",
"process": "^0.11.10",
"punycode": "^1.4.1",

43
src/manifest.ch.json Normal file
View File

@ -0,0 +1,43 @@
{
"manifest_version": 3,
"name": "pinmenote",
"short_name": "pinmenote",
"description": "Pin note on website, modify, draw, comment and archive content.",
"version": "0.0.1",
"icons": {
"16": "assets/icon/16.png",
"32": "assets/icon/32.png",
"64": "assets/icon/64.png",
"128": "assets/icon/128.png"
},
"author": "pinmenote (contact@pintmenote.com)",
"action": {
"default_icon": {
"16": "assets/icon/16.png",
"24": "assets/icon/24.png",
"32": "assets/icon/32.png"
},
"default_title": "pinmenote",
"default_popup": "default-popup/default-popup.html"
},
"permissions": ["activeTab", "storage", "unlimitedStorage", "scripting", "downloads"],
"host_permissions": ["<all_urls>"],
"background": {
"service_worker": "service-worker/service-worker.ts",
"type": "module"
},
"content_scripts": [{
"matches": ["<all_urls>"],
"all_frames": false,
"js": ["content-script/content-script.ts"],
"run_at": "document_start"
},{
"matches": ["<all_urls>"],
"all_frames": true,
"js": ["iframe/iframe-script.ts"],
"run_at": "document_idle"
}],
"options_ui": {
"page": "options-ui/options-ui.html"
}
}

View File

@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "pinmenote",
"short_name": "pinmenote",
"name": "pinmenote-dev",
"short_name": "pinmenote-dev",
"description": "Pin note on website, modify, draw, comment and archive content.",
"version": "0.0.1",
"icons": {