remove raw-loader and add resolve alias for svgs

This commit is contained in:
Send_Nukez 2021-11-12 16:25:09 +01:00
parent 5256ff6b7a
commit ec84ad0c79
2 changed files with 8 additions and 3 deletions

View file

@ -23,7 +23,6 @@
"markdown-it": "^12.2.0", "markdown-it": "^12.2.0",
"markdown-it-attrs": "^4.1.0", "markdown-it-attrs": "^4.1.0",
"moment": "^2.29.1", "moment": "^2.29.1",
"node-vibrant": "3.1.4", "node-vibrant": "3.1.4"
"raw-loader": "^4.0.2"
} }
} }

View file

@ -11,6 +11,12 @@ module.exports = {
path: path.resolve(__dirname, "dist"), path: path.resolve(__dirname, "dist"),
filename: "dribbblish-dynamic.js" filename: "dribbblish-dynamic.js"
}, },
resolve: {
extensions: [".js", ".svg"],
alias: {
svg: path.resolve(__dirname, "./src/svg")
}
},
module: { module: {
rules: [ rules: [
{ {
@ -46,7 +52,7 @@ module.exports = {
{ {
test: /\.svg/, test: /\.svg/,
exclude: /node_modules/, exclude: /node_modules/,
use: ["raw-loader"] type: "asset/source"
} }
] ]
}, },