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 { GTranslateScraper } from "./gtranslate_scraper";
|
||||||
import { Flashcards } from "./database";
|
import { Flashcards } from "./database";
|
||||||
import { Communicator, commandKinds } from "../communication";
|
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();
|
let com = new Communicator();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { browser, WebRequest, Runtime } from "webextension-polyfill-ts";
|
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 {
|
export class GTranslateScraper {
|
||||||
iframe: HTMLIFrameElement;
|
iframe: HTMLIFrameElement;
|
||||||
|
|
6
src/types.d.ts
vendored
6
src/types.d.ts
vendored
|
@ -1,6 +1,6 @@
|
||||||
declare module "*?raw" {
|
declare module "*?file" {
|
||||||
const contents: string;
|
const file: string;
|
||||||
export = contents;
|
export = file;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare interface Translation {
|
declare interface Translation {
|
||||||
|
|
|
@ -31,7 +31,7 @@ let options = {
|
||||||
|
|
||||||
oneOf: [
|
oneOf: [
|
||||||
{
|
{
|
||||||
resourceQuery: /raw/,
|
resourceQuery: /file/,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: "worklet-loader",
|
loader: "worklet-loader",
|
||||||
|
@ -50,15 +50,7 @@ let options = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.(c|s[ac])ss$/i,
|
test: /\.(c|s[ac])ss$/i,
|
||||||
oneOf: [
|
use: ["style-loader", "css-loader", "sass-loader"],
|
||||||
{
|
|
||||||
resourceQuery: /raw/,
|
|
||||||
use: ["raw-loader", "sass-loader"],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
use: ["style-loader", "css-loader", "sass-loader"],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.(html|svelte)$/,
|
test: /\.(html|svelte)$/,
|
||||||
|
|
Loading…
Reference in a new issue