Update esbuild.config and manifest
This commit is contained in:
		
							parent
							
								
									7ec94f56cd
								
							
						
					
					
						commit
						e9c5b65aa7
					
				@ -2,6 +2,13 @@ import esbuild from 'esbuild';
 | 
				
			|||||||
import scss from 'esbuild-plugin-sass';
 | 
					import scss from 'esbuild-plugin-sass';
 | 
				
			||||||
import svg from 'esbuild-plugin-svgr';
 | 
					import svg from 'esbuild-plugin-svgr';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const watch = process.argv.includes('--watch') && {
 | 
				
			||||||
 | 
					    onRebuild(error) {
 | 
				
			||||||
 | 
					        if (error) console.error('[watch] build failed', error);
 | 
				
			||||||
 | 
					        else console.log('[watch] build finished');
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
esbuild
 | 
					esbuild
 | 
				
			||||||
    .build({
 | 
					    .build({
 | 
				
			||||||
        entryPoints: [
 | 
					        entryPoints: [
 | 
				
			||||||
@ -11,17 +18,11 @@ esbuild
 | 
				
			|||||||
            'background.ts',
 | 
					            'background.ts',
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        bundle: true,
 | 
					        bundle: true,
 | 
				
			||||||
 | 
					        minify: true,
 | 
				
			||||||
        outdir: './lib',
 | 
					        outdir: './lib',
 | 
				
			||||||
        loader: { '.woff': 'file', '.woff2': 'file' },
 | 
					        loader: { '.woff': 'file', '.woff2': 'file' },
 | 
				
			||||||
        plugins: [scss(), svg()],
 | 
					        plugins: [scss(), svg()],
 | 
				
			||||||
        watch: {
 | 
					        watch,
 | 
				
			||||||
            onRebuild(error, result) {
 | 
					 | 
				
			||||||
                try {
 | 
					 | 
				
			||||||
                    console.log('watch build succeeded:', result);
 | 
					 | 
				
			||||||
                } catch (error) {
 | 
					 | 
				
			||||||
                    console.error('watch build failed:', error);
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
 | 
					    .then(() => console.log('Add-on was built'))
 | 
				
			||||||
    .catch(() => process.exit(1));
 | 
					    .catch(() => process.exit(1));
 | 
				
			||||||
 | 
				
			|||||||
@ -1,22 +1,21 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    "description": "Wtyczka pokazująca, jakie dane zostały ~~wykradzione~~ wysłane do podmiotów trzecich przez odwiedzane strony.",
 | 
				
			||||||
    "manifest_version": 2,
 | 
					    "manifest_version": 2,
 | 
				
			||||||
    "name": "Problematyczne requesty",
 | 
					    "name": "Problematyczne requesty",
 | 
				
			||||||
    "version": "1.0",
 | 
					    "version": "1.0",
 | 
				
			||||||
 | 
					    "homepage_url": "https://git.internet-czas-dzialac.pl/icd/problematic-requests",
 | 
				
			||||||
    "description": "",
 | 
					    "background": {
 | 
				
			||||||
 | 
					        "scripts": ["lib/background.js"]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "sidebar_action": {
 | 
					    "sidebar_action": {
 | 
				
			||||||
        "default_title": "Problematic requests",
 | 
					        "default_title": "Problematyczne requesty",
 | 
				
			||||||
        "default_panel": "sidebar/sidebar.html",
 | 
					        "default_panel": "sidebar/sidebar.html",
 | 
				
			||||||
        "default_icon": "icons/logo-black-square.svg",
 | 
					        "default_icon": "icons/logo-black-square.svg",
 | 
				
			||||||
        "browser_style": true,
 | 
					        "browser_style": true,
 | 
				
			||||||
        "open_at_install": true
 | 
					        "open_at_install": true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "background": {
 | 
					 | 
				
			||||||
        "scripts": ["lib/background.js"]
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "icons": {
 | 
					    "icons": {
 | 
				
			||||||
        "48": "icons/border-48.png"
 | 
					        "48": "icons/logo-black-square.svg"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "permissions": [
 | 
					    "permissions": [
 | 
				
			||||||
        "proxy",
 | 
					        "proxy",
 | 
				
			||||||
 | 
				
			|||||||
@ -6,7 +6,7 @@
 | 
				
			|||||||
  "type": "module",
 | 
					  "type": "module",
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
    "build": "node esbuild.config.js",
 | 
					    "build": "node esbuild.config.js",
 | 
				
			||||||
    "watch": "npm run build -- --watch",
 | 
					    "watch": "node esbuild.config.js --watch",
 | 
				
			||||||
    "typecheck": "tsc --noEmit"
 | 
					    "typecheck": "tsc --noEmit"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "repository": {
 | 
					  "repository": {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user