Remove css raw loader
This commit is contained in:
parent
e6cb37626c
commit
cac69a2e98
4 changed files with 7 additions and 15 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
6
src/types.d.ts
vendored
6
src/types.d.ts
vendored
|
@ -1,6 +1,6 @@
|
|||
declare module "*?raw" {
|
||||
const contents: string;
|
||||
export = contents;
|
||||
declare module "*?file" {
|
||||
const file: string;
|
||||
export = file;
|
||||
}
|
||||
|
||||
declare interface Translation {
|
||||
|
|
|
@ -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)$/,
|
||||
|
|
Loading…
Reference in a new issue