@equinor/fusion-framework-vite-plugin-spa 1.2.1 → 1.2.2

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.
@@ -15,5 +15,5 @@
15
15
  * @constant
16
16
  * @type {string}
17
17
  */
18
- export declare const html = "\n <!DOCTYPE html>\n <html>\n <head>\n <title>%FUSION_SPA_TITLE%</title>\n <meta name=\"mode\" content=\"%MODE%\">\n <meta name=\"fusion-spa-plugin-version\" content=\"1.2.1\">\n <link rel=\"stylesheet\" href=\"https://cdn.eds.equinor.com/font/equinor-font.css\" />\n <script type=\"module\" src=\"%FUSION_SPA_BOOTSTRAP%\"></script>\n <script>\n // suppress console error for custom elements already defined. \n // WebComponents should be added by the portal, but not removed from application\n const _customElementsDefine = window.customElements.define;\n window.customElements.define = (name, cl, conf) => {\n if (!customElements.get(name)) {\n _customElementsDefine.call(window.customElements, name, cl, conf);\n }\n };\n </script>\n <style>\n html, body {\n margin: 0;\n padding: 0;\n height: 100%;\n font-family: 'EquinorFont', sans-serif;\n }\n </style>\n </head>\n <body></body>\n </html>\n";
18
+ export declare const html = "\n <!DOCTYPE html>\n <html>\n <head>\n <title>%FUSION_SPA_TITLE%</title>\n <meta name=\"mode\" content=\"%MODE%\">\n <meta name=\"fusion-spa-plugin-version\" content=\"1.2.2\">\n <link rel=\"stylesheet\" href=\"https://cdn.eds.equinor.com/font/equinor-font.css\" />\n <script type=\"module\" src=\"%FUSION_SPA_BOOTSTRAP%\"></script>\n <script>\n // suppress console error for custom elements already defined. \n // WebComponents should be added by the portal, but not removed from application\n const _customElementsDefine = window.customElements.define;\n window.customElements.define = (name, cl, conf) => {\n if (!customElements.get(name)) {\n _customElementsDefine.call(window.customElements, name, cl, conf);\n }\n };\n </script>\n <style>\n html, body {\n margin: 0;\n padding: 0;\n height: 100%;\n font-family: 'EquinorFont', sans-serif;\n }\n </style>\n </head>\n <body></body>\n </html>\n";
19
19
  export default html;
@@ -1,4 +1,4 @@
1
- import type { Plugin } from 'vite';
1
+ import { type Plugin } from 'vite';
2
2
  import type { TemplateEnv, TemplateEnvFn } from './types.js';
3
3
  /**
4
4
  * Represents the options for configuring a plugin.
@@ -1 +1 @@
1
- export declare const version = "1.2.1";
1
+ export declare const version = "1.2.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-vite-plugin-spa",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Vite plugin for SPA development",
5
5
  "type": "module",
6
6
  "types": "dist/types/index.d.ts",
@@ -47,15 +47,15 @@
47
47
  "rollup": "^4.39.0",
48
48
  "typescript": "^5.8.2",
49
49
  "vite": "^7.1.9",
50
- "@equinor/fusion-framework-module-http": "7.0.2",
50
+ "@equinor/fusion-framework-module": "5.0.3",
51
51
  "@equinor/fusion-framework-module-msal": "5.1.0",
52
52
  "@equinor/fusion-framework-module-service-discovery": "9.0.2",
53
- "@equinor/fusion-framework-module": "5.0.3",
53
+ "@equinor/fusion-framework-module-http": "7.0.2",
54
54
  "@equinor/fusion-framework-module-telemetry": "4.2.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "@equinor/fusion-framework-module-http": "7.0.2",
58
57
  "@equinor/fusion-framework-module": "5.0.3",
58
+ "@equinor/fusion-framework-module-http": "7.0.2",
59
59
  "@equinor/fusion-framework-module-msal": "5.1.0",
60
60
  "@equinor/fusion-framework-module-service-discovery": "9.0.2",
61
61
  "@equinor/fusion-framework-module-telemetry": "4.2.0"
package/src/plugin.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Plugin } from 'vite';
1
+ import { normalizePath, type Plugin } from 'vite';
2
2
 
3
3
  import { fileURLToPath } from 'node:url';
4
4
 
@@ -88,7 +88,9 @@ export const plugin = <TEnv extends TemplateEnv = TemplateEnv>(
88
88
  config.server.fs ??= {};
89
89
  config.server.fs.allow ??= [];
90
90
  // allow access to the html directory
91
- config.server.fs.allow.push(new URL('../html', import.meta.url).pathname);
91
+
92
+ const htmlDir = fileURLToPath(new URL('../html', import.meta.url));
93
+ config.server.fs.allow.push(normalizePath(htmlDir));
92
94
 
93
95
  log?.info(`plugin configured for ${env.FUSION_SPA_PORTAL_ID}`);
94
96
  },
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '1.2.1';
2
+ export const version = '1.2.2';