This commit is contained in:
1 parent
b234c8dcae
commit
001cf146ee
10 files changed
+189
-217
No files matched your search
+9
-6
@@ -8,8 +8,8 @@
|
||||
*/
|
||||
import { defineConfig } from 'vite';
|
||||
import { resolve } from 'path';
|
||||
import { copyFileSync, mkdirSync, writeFileSync } from 'fs';
|
||||
import sharp from 'sharp';
|
||||
import { copyFileSync, mkdirSync, writeFileSync } from 'fs';
|
||||
|
||||
export default defineConfig({
|
||||
root: 'src',
|
||||
@@ -51,10 +51,8 @@ export default defineConfig({
|
||||
build: {
|
||||
target: 'chrome110',
|
||||
outDir: '../dist',
|
||||
emptyOutDir: true,
|
||||
modulePreload: {
|
||||
polyfill: false,
|
||||
},
|
||||
emptyOutdir: true,
|
||||
minify: false,
|
||||
rollupOptions: {
|
||||
input: {
|
||||
background: resolve(__dirname, 'src/background/background.js'),
|
||||
@@ -62,7 +60,9 @@ export default defineConfig({
|
||||
viewer: resolve(__dirname, 'src/viewer/viewer.html'),
|
||||
viewerIndex: resolve(__dirname, 'src/viewer/index.html'),
|
||||
interceptors: resolve(__dirname, 'src/inject/interceptors.js'),
|
||||
hls: resolve(__dirname, 'src/inject/hls.min.js'),
|
||||
// NOTE: hlds is NOT built by Vite — copied from source as pure ES5 to avoid
|
||||
// esbuild injecting arrow functions (Chrome flags these as "ES module content"
|
||||
// in extension URLs, preventing window.Hls registration).
|
||||
},
|
||||
output: {
|
||||
entryFileNames: '[name].js',
|
||||
@@ -70,5 +70,8 @@ export default defineConfig({
|
||||
assetFileNames: '[name][extname]',
|
||||
},
|
||||
},
|
||||
modulePreload: {
|
||||
polyfill: false,
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user