Skip to content

Commit d46e00a

Browse files
authored
Add css-charset-webpack-plugin and tweak warning suppression (#1613)
1 parent 57a1c7a commit d46e00a

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@veupathdb/browserslist-config": "workspace:^",
2323
"@veupathdb/prettier-config": "workspace:^",
2424
"browserslist-useragent-regexp": "^4.1.3",
25+
"css-charset-webpack-plugin": "^1.1.7",
2526
"husky": "^8.0.3",
2627
"lint-staged": "^13.2.0",
2728
"nx": "16.3.2",

packages/configs/site-webpack-config/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
var baseConfig = require('@veupathdb/base-webpack-config');
22

3+
const CssCharsetPlugin = require('css-charset-webpack-plugin');
4+
35
// Create webpack alias configuration object
46
var alias = {
57
site: process.cwd() + '/webapp',
@@ -22,7 +24,7 @@ class SuppressProvidedDependencyCacheWarnings {
2224
origin === 'webpack.cache.PackFileCacheStrategy' &&
2325
type === 'warn' &&
2426
args.length > 0 &&
25-
String(args[0]).includes('ProvidedDependency')
27+
String(args[0]).includes('Skipped not serializable cache item')
2628
) {
2729
return true; // returning true suppresses this log entry
2830
}
@@ -69,6 +71,7 @@ module.exports = function configure(additionalConfig) {
6971
process: 'process/browser',
7072
}),
7173
new SuppressProvidedDependencyCacheWarnings(),
74+
new CssCharsetPlugin({ charset: 'utf-8' }),
7275
],
7376

7477
// Map external libraries Wdk exposes so we can do things like:

yarn.lock

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15097,6 +15097,15 @@ __metadata:
1509715097
languageName: node
1509815098
linkType: hard
1509915099

15100+
"css-charset-webpack-plugin@npm:^1.1.7":
15101+
version: 1.1.7
15102+
resolution: "css-charset-webpack-plugin@npm:1.1.7"
15103+
peerDependencies:
15104+
webpack: ^1 || ^2 || ^3 || ^4 || ^5
15105+
checksum: 10/20dcd89ba9c4caf15a025a4728b37d0b6aef5a0769deb19ba3422f656672d3680c318d0405c253261b66c8b4561721e92d2219af89c39f78bb6452a37cd2794a
15106+
languageName: node
15107+
linkType: hard
15108+
1510015109
"css-color-names@npm:0.0.4, css-color-names@npm:^0.0.4":
1510115110
version: 0.0.4
1510215111
resolution: "css-color-names@npm:0.0.4"
@@ -26925,6 +26934,7 @@ __metadata:
2692526934
"@veupathdb/browserslist-config": "workspace:^"
2692626935
"@veupathdb/prettier-config": "workspace:^"
2692726936
browserslist-useragent-regexp: "npm:^4.1.3"
26937+
css-charset-webpack-plugin: "npm:^1.1.7"
2692826938
husky: "npm:^8.0.3"
2692926939
lint-staged: "npm:^13.2.0"
2693026940
nx: "npm:16.3.2"

0 commit comments

Comments
 (0)