Add raw loader for scss
This commit is contained in:
parent
feb9177f92
commit
e0031a17d4
5 changed files with 25 additions and 5 deletions
|
@ -15,6 +15,7 @@
|
||||||
"husky": ">=4",
|
"husky": ">=4",
|
||||||
"lint-staged": ">=10",
|
"lint-staged": ">=10",
|
||||||
"prettier": "^2.0.5",
|
"prettier": "^2.0.5",
|
||||||
|
"raw-loader": "^4.0.1",
|
||||||
"sass": "^1.26.10",
|
"sass": "^1.26.10",
|
||||||
"sass-loader": "^9.0.2",
|
"sass-loader": "^9.0.2",
|
||||||
"style-loader": "^1.2.1",
|
"style-loader": "^1.2.1",
|
||||||
|
|
5
src/types.d.ts
vendored
5
src/types.d.ts
vendored
|
@ -1,3 +1,8 @@
|
||||||
|
declare module "*.raw" {
|
||||||
|
const content: string;
|
||||||
|
export = content;
|
||||||
|
}
|
||||||
|
|
||||||
declare const enum commands {
|
declare const enum commands {
|
||||||
setEnabled = "toggleCommand",
|
setEnabled = "toggleCommand",
|
||||||
getEnabled = "getEnabled",
|
getEnabled = "getEnabled",
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"target": "es6",
|
"target": "es6",
|
||||||
"jsx": "react",
|
"jsx": "react",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"sourceMap": true
|
"sourceMap": true,
|
||||||
|
"esModuleInterop": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,12 @@ let mode = process.env.NODE_ENV || "development";
|
||||||
let options = {
|
let options = {
|
||||||
entry: {
|
entry: {
|
||||||
popup: path.join(__dirname, "src", "popup", "popup.ts"),
|
popup: path.join(__dirname, "src", "popup", "popup.ts"),
|
||||||
content_script: path.join(__dirname, "src", "content_script.ts"),
|
content_script: path.join(
|
||||||
|
__dirname,
|
||||||
|
"src",
|
||||||
|
"content_script",
|
||||||
|
"content_script.ts"
|
||||||
|
),
|
||||||
background: path.join(__dirname, "src", "background.ts"),
|
background: path.join(__dirname, "src", "background.ts"),
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
|
@ -35,11 +40,11 @@ let options = {
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.css$/i,
|
test: /\.(c|s[ac])ss\.raw$/i,
|
||||||
use: ["style-loader", "css-loader"],
|
use: ["raw-loader", "sass-loader"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.s[ac]ss$/i,
|
test: /\.(c|s[ac])ss$/i,
|
||||||
use: ["style-loader", "css-loader", "sass-loader"],
|
use: ["style-loader", "css-loader", "sass-loader"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -5038,6 +5038,14 @@ randomfill@^1.0.3:
|
||||||
randombytes "^2.0.5"
|
randombytes "^2.0.5"
|
||||||
safe-buffer "^5.1.0"
|
safe-buffer "^5.1.0"
|
||||||
|
|
||||||
|
raw-loader@^4.0.1:
|
||||||
|
version "4.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-4.0.1.tgz#14e1f726a359b68437e183d5a5b7d33a3eba6933"
|
||||||
|
integrity sha512-baolhQBSi3iNh1cglJjA0mYzga+wePk7vdEX//1dTFd+v4TsQlQE0jitJSNF1OIP82rdYulH7otaVmdlDaJ64A==
|
||||||
|
dependencies:
|
||||||
|
loader-utils "^2.0.0"
|
||||||
|
schema-utils "^2.6.5"
|
||||||
|
|
||||||
rc@^1.2.8:
|
rc@^1.2.8:
|
||||||
version "1.2.8"
|
version "1.2.8"
|
||||||
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
|
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
|
||||||
|
|
Loading…
Reference in a new issue