diff --git a/src/background/background.ts b/src/background/background.ts index af161d0..055ebbf 100644 --- a/src/background/background.ts +++ b/src/background/background.ts @@ -2,7 +2,7 @@ import { browser, Runtime, Tabs } from "webextension-polyfill-ts"; import { GTranslateScraper } from "./gtranslate_scraper"; import { Flashcards } from "./database"; import { Communicator, commandKinds } from "../communication"; -import content_script from "../frontend/content_script/content_script.ts?raw"; +import content_script from "../frontend/content_script/content_script.ts?file"; let com = new Communicator(); diff --git a/src/background/gtranslate_scraper.ts b/src/background/gtranslate_scraper.ts index 9aa05d2..720a8ed 100644 --- a/src/background/gtranslate_scraper.ts +++ b/src/background/gtranslate_scraper.ts @@ -1,5 +1,5 @@ import { browser, WebRequest, Runtime } from "webextension-polyfill-ts"; -import content_script from "./gtranslate_content_script.ts?raw"; +import content_script from "./gtranslate_content_script.ts?file"; export class GTranslateScraper { iframe: HTMLIFrameElement; diff --git a/src/types.d.ts b/src/types.d.ts index ee91d73..e1ec848 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -1,6 +1,6 @@ -declare module "*?raw" { - const contents: string; - export = contents; +declare module "*?file" { + const file: string; + export = file; } declare interface Translation { diff --git a/webpack.config.js b/webpack.config.js index c1c933c..8c3dc3f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -31,7 +31,7 @@ let options = { oneOf: [ { - resourceQuery: /raw/, + resourceQuery: /file/, use: [ { loader: "worklet-loader", @@ -50,15 +50,7 @@ let options = { }, { test: /\.(c|s[ac])ss$/i, - oneOf: [ - { - resourceQuery: /raw/, - use: ["raw-loader", "sass-loader"], - }, - { - use: ["style-loader", "css-loader", "sass-loader"], - }, - ], + use: ["style-loader", "css-loader", "sass-loader"], }, { test: /\.(html|svelte)$/,