1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Webpack config fixes (#7423)

Signed-off-by: Juho Heikka <juho.heikka@gmail.com>
This commit is contained in:
Juho Heikka 2023-04-04 09:36:02 +03:00 committed by GitHub
parent 7116e55d5a
commit 1308b5ed6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 51 additions and 1 deletions

View File

@ -17,6 +17,7 @@
"noImplicitAny": true,
"noUnusedLocals": true,
"noImplicitReturns": true,
"experimentalDecorators": true,
"isolatedModules": true,
"skipLibCheck": true,
"allowJs": false,

View File

@ -27,8 +27,10 @@
"css-loader": "^6.7.2",
"fork-ts-checker-webpack-plugin": "^7.3.0",
"mini-css-extract-plugin": "^2.7.3",
"sass": "^1.58.2",
"sass-loader": "^13.2.0",
"style-loader": "^3.3.1",
"tailwindcss": "^3.2.4",
"ts-loader": "^9.4.1",
"webpack": "^5.77.0",
"webpack-cli": "^4.10.0",

View File

@ -157,6 +157,17 @@ Array [
"sourceMap": false,
},
},
Object {
"loader": "postcss-loader",
"options": Object {
"postcssOptions": Object {
"plugins": Array [
"tailwindcss",
],
},
"sourceMap": false,
},
},
Object {
"loader": "sass-loader",
"options": Object {
@ -165,6 +176,18 @@ Array [
},
],
},
Object {
"test": /\\\\\\.\\(ttf\\|eot\\|woff2\\?\\)\\$/,
"type": "asset/resource",
},
Object {
"test": /\\\\\\.svg\\$/,
"type": "asset/source",
},
Object {
"test": /\\\\\\.\\(jpg\\|png\\|ico\\)\\$/,
"type": "asset/resource",
},
],
},
"name": "./some-other-entrypoint/index.ts",

View File

@ -8,7 +8,6 @@ module.exports =
entrypointFilePath,
outputDirectory,
});
return {
...nodeConfig,
@ -46,6 +45,16 @@ module.exports =
},
},
{
loader: "postcss-loader",
options: {
sourceMap: false,
postcssOptions: {
plugins: ["tailwindcss"],
},
},
},
{
loader: "sass-loader",
options: {
@ -54,6 +63,21 @@ module.exports =
},
],
},
{
test: /\.(ttf|eot|woff2?)$/,
type: "asset/resource",
},
{
test: /\.svg$/,
type: "asset/source", // exports the source code of the asset, so we get XML
},
{
test: /\.(jpg|png|ico)$/,
type: "asset/resource",
},
],
},
};