mirror of
https://github.com/chenasraf/copy-tab-url.git
synced 2026-05-17 17:38:15 +00:00
28 lines
687 B
TypeScript
28 lines
687 B
TypeScript
import { sharedConfig } from './vite.config'
|
|
import { r, isDev } from './scripts/utils'
|
|
import packageJson from './package.json'
|
|
import { defineConfig } from 'vite'
|
|
|
|
// bundling the content script using Vite
|
|
export default defineConfig({
|
|
...sharedConfig,
|
|
build: {
|
|
watch: isDev ? {} : undefined,
|
|
outDir: r('extension/dist/contentScripts'),
|
|
cssCodeSplit: false,
|
|
emptyOutDir: false,
|
|
sourcemap: isDev ? 'inline' : false,
|
|
lib: {
|
|
entry: r('src/contentScripts/main.tsx'),
|
|
name: packageJson.name,
|
|
formats: ['iife'],
|
|
},
|
|
rollupOptions: {
|
|
output: {
|
|
entryFileNames: 'index.global.js',
|
|
extend: true,
|
|
},
|
|
},
|
|
},
|
|
})
|