@forsakringskassan/vite-lib-config 5.5.0 → 5.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10968,7 +10968,8 @@ function lookupFile(nameWithoutExtension) {
10968
10968
  }
10969
10969
 
10970
10970
  // src/plugins/index-html-plugin.ts
10971
- var templateFile = import_node_path3.default.resolve(__dirname, "../assets/index.html");
10971
+ var rootDir = import_node_path3.default.resolve(__dirname, "..");
10972
+ var templateFile = import_node_path3.default.join(rootDir, "assets/index.html");
10972
10973
  var VIRTUAL_ENTRYPOINT = "index.html";
10973
10974
  function isHtmlPage(url) {
10974
10975
  if (!url) {
@@ -10981,6 +10982,7 @@ function middleware(server) {
10981
10982
  const { url } = req;
10982
10983
  if (isHtmlPage(url)) {
10983
10984
  try {
10985
+ res.setHeader("content-type", "text/html; charset=utf-8");
10984
10986
  res.end(await server.transformIndexHtml(url, ""));
10985
10987
  } catch (err) {
10986
10988
  console.error(err);
@@ -10960,7 +10960,8 @@ function lookupFile(nameWithoutExtension) {
10960
10960
  }
10961
10961
 
10962
10962
  // src/plugins/index-html-plugin.ts
10963
- var templateFile = path2.resolve(__dirname, "../assets/index.html");
10963
+ var rootDir = path2.resolve(__dirname, "..");
10964
+ var templateFile = path2.join(rootDir, "assets/index.html");
10964
10965
  var VIRTUAL_ENTRYPOINT = "index.html";
10965
10966
  function isHtmlPage(url) {
10966
10967
  if (!url) {
@@ -10973,6 +10974,7 @@ function middleware(server) {
10973
10974
  const { url } = req;
10974
10975
  if (isHtmlPage(url)) {
10975
10976
  try {
10977
+ res.setHeader("content-type", "text/html; charset=utf-8");
10976
10978
  res.end(await server.transformIndexHtml(url, ""));
10977
10979
  } catch (err) {
10978
10980
  console.error(err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/vite-lib-config",
3
- "version": "5.5.0",
3
+ "version": "5.6.1",
4
4
  "description": "Försäkringskassan toolchain to build libraries with Vite",
5
5
  "keywords": [
6
6
  "vite"
@@ -17,7 +17,13 @@
17
17
  * - "Types of property 'setup' are incompatable"
18
18
  * - etc...
19
19
  */
20
- "strictFunctionTypes": false
20
+ "strictFunctionTypes": false,
21
+
22
+ /* stricter config */
23
+ "allowUnusedLabels": false,
24
+ "allowUnreachableCode": false,
25
+ "noImplicitOverride": true,
26
+ "noFallthroughCasesInSwitch": true
21
27
  },
22
28
  "include": [
23
29
  "${configDir}/src/**/*.ts",
@@ -4,7 +4,13 @@
4
4
  "compilerOptions": {
5
5
  "composite": true,
6
6
  "tsBuildInfoFile": "${configDir}/temp/tsconfig.lib.tsbuildinfo",
7
- "types": ["node", "vite/client"]
7
+ "types": ["node", "vite/client"],
8
+
9
+ /* stricter config */
10
+ "allowUnusedLabels": false,
11
+ "allowUnreachableCode": false,
12
+ "noImplicitOverride": true,
13
+ "noFallthroughCasesInSwitch": true
8
14
  },
9
15
  "include": ["${configDir}/src/**/*.ts", "${configDir}/src/**/*.vue"],
10
16
  "exclude": [
@@ -5,7 +5,13 @@
5
5
  "tsBuildInfoFile": "${configDir}/temp/tsconfig.pageobjects.tsbuildinfo",
6
6
  "types": ["cypress"],
7
7
  "emitDeclarationOnly": true,
8
- "skipLibCheck": true
8
+ "skipLibCheck": true,
9
+
10
+ /* stricter config */
11
+ "allowUnusedLabels": false,
12
+ "allowUnreachableCode": false,
13
+ "noImplicitOverride": true,
14
+ "noFallthroughCasesInSwitch": true
9
15
  },
10
16
  "include": [
11
17
  "${configDir}/src/cypress/**/*.ts",
@@ -4,7 +4,13 @@
4
4
  "composite": true,
5
5
  "tsBuildInfoFile": "${configDir}/temp/tsconfig.selectors.tsbuildinfo",
6
6
  "types": [],
7
- "emitDeclarationOnly": true
7
+ "emitDeclarationOnly": true,
8
+
9
+ /* stricter config */
10
+ "allowUnusedLabels": false,
11
+ "allowUnreachableCode": false,
12
+ "noImplicitOverride": true,
13
+ "noFallthroughCasesInSwitch": true
8
14
  },
9
15
  "include": ["${configDir}/src/selectors/**/*.ts"],
10
16
  "exclude": ["${configDir}/src/**/*.spec.ts"]