diff --git a/package.json b/package.json index 642b3905..7324df8f 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "scripts": { "analyze": "bash ./scripts/analyze.sh", "build": "bash ./scripts/build.sh", - "dev": "bash ./scripts/dev.sh chrome", + "dev": "bash ./scripts/dev.sh", "lint": "concurrently \"lint:*\"", "lint:fix": "eslint --ext js,jsx,ts,tsx, src --fix", "lint:eslint": "eslint . --ext .js,.ts,.tsx --max-warnings 0 --ignore-path .gitignore", diff --git a/src/content/index.tsx b/src/content/index.ts similarity index 100% rename from src/content/index.tsx rename to src/content/index.ts diff --git a/src/content/static/index.ts b/src/content/static/index.ts index 2f581f0b..7bdea7c1 100644 --- a/src/content/static/index.ts +++ b/src/content/static/index.ts @@ -4,6 +4,7 @@ function inject(configure: (_script: HTMLScriptElement) => void) { const script = document.createElement('script') configure(script) document.documentElement.appendChild(script) + document.documentElement.removeChild(script) } // eslint-disable-next-line @typescript-eslint/no-extra-semi diff --git a/webpack.config.utils.ts b/webpack.config.utils.ts index 7f05dfcb..32614c34 100644 --- a/webpack.config.utils.ts +++ b/webpack.config.utils.ts @@ -109,7 +109,7 @@ export const getOutput = (browserDir: string, outputDir = Directories.DEV_DIR) = export const getEntry = (sourceDir = Directories.SRC_DIR) => { return { popup: [path.resolve(__dirname, `${sourceDir}/popup/index.tsx`)], - content: [path.resolve(__dirname, `${sourceDir}/content/index.tsx`)], + content: [path.resolve(__dirname, `${sourceDir}/content/index.ts`)], contentStatic: [path.resolve(__dirname, `${sourceDir}/content/static/index.ts`)], background: [path.resolve(__dirname, `${sourceDir}/background/index.ts`)], }