Add raw loader for scss
This commit is contained in:
parent
feb9177f92
commit
4ca87d0f15
4 changed files with 23 additions and 4 deletions
|
@ -15,6 +15,7 @@
|
|||
"husky": ">=4",
|
||||
"lint-staged": ">=10",
|
||||
"prettier": "^2.0.5",
|
||||
"raw-loader": "^4.0.1",
|
||||
"sass": "^1.26.10",
|
||||
"sass-loader": "^9.0.2",
|
||||
"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 {
|
||||
setEnabled = "toggleCommand",
|
||||
getEnabled = "getEnabled",
|
||||
|
|
|
@ -10,7 +10,12 @@ let mode = process.env.NODE_ENV || "development";
|
|||
let options = {
|
||||
entry: {
|
||||
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"),
|
||||
},
|
||||
output: {
|
||||
|
@ -35,11 +40,11 @@ let options = {
|
|||
exclude: /node_modules/,
|
||||
},
|
||||
{
|
||||
test: /\.css$/i,
|
||||
use: ["style-loader", "css-loader"],
|
||||
test: /\.(c|s[ac])ss\.raw$/i,
|
||||
use: ["raw-loader", "sass-loader"],
|
||||
},
|
||||
{
|
||||
test: /\.s[ac]ss$/i,
|
||||
test: /\.(c|s[ac])ss$/i,
|
||||
use: ["style-loader", "css-loader", "sass-loader"],
|
||||
},
|
||||
],
|
||||
|
|
|
@ -5038,6 +5038,14 @@ randomfill@^1.0.3:
|
|||
randombytes "^2.0.5"
|
||||
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:
|
||||
version "1.2.8"
|
||||
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
|
||||
|
|
Loading…
Reference in a new issue