@nsshunt/stsoauth2plugin 0.1.35 → 0.1.36

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.
Files changed (2) hide show
  1. package/package.json +3 -2
  2. package/vite.config.ts +62 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nsshunt/stsoauth2plugin",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
4
4
  "description": "STS OAuth2 VUE Plugin",
5
5
  "main": "dist/index.js",
6
6
  "types": "./types/index.d.ts",
@@ -43,6 +43,7 @@
43
43
  "debug": "^4.3.4",
44
44
  "es-cookie": "^1.3.2",
45
45
  "http-status-codes": "^2.2.0",
46
- "jwt-decode": "^3.1.2"
46
+ "jwt-decode": "^3.1.2",
47
+ "vite": "^2.9.12"
47
48
  }
48
49
  }
package/vite.config.ts ADDED
@@ -0,0 +1,62 @@
1
+ import { fileURLToPath, URL } from 'url'
2
+
3
+ import { defineConfig } from 'vite'
4
+ import path from 'path'
5
+ import fs from 'fs';
6
+
7
+ // https://vitejs.dev/config/
8
+ export default ({ mode }) => {
9
+ //export default defineConfig({
10
+ //process.env = {...process.env, ...loadEnv(mode, process.cwd())};
11
+ // https://github.com/vitejs/vite/issues/1930
12
+
13
+ return defineConfig({
14
+ define: {
15
+ 'process.argv': [ process.cwd() ], //@@ only required because of colors - delete ...
16
+ 'process.env': { ...process.env },
17
+ // Define process properties used by various imports
18
+ 'process.pid': 0,
19
+ 'process.stdout': null,
20
+ 'process.stderr': null,
21
+ 'process.platform': null
22
+ },
23
+ resolve: {
24
+ alias: {
25
+ //'@': path.resolve(__dirname, 'src'),
26
+ '@': fileURLToPath(new URL('./src', import.meta.url))
27
+ },
28
+ },
29
+
30
+ build: {
31
+ lib: {
32
+ entry: path.resolve(__dirname, 'src/index.ts'),
33
+ name: 'stsoauth2plugin',
34
+ formats: ['es'],
35
+ fileName: (format) => `stsoauth2plugin.${format}.js`
36
+ },
37
+ /*
38
+ rollupOptions: {
39
+ output: {
40
+ manualChunks: {
41
+ stsoauth2plugin: ['@nsshunt/stsoauth2plugin'],
42
+ stsinstrumentation: ['@nsshunt/stsinstrumentation'],
43
+ stsmodels: ['@nsshunt/stsmodels'],
44
+ stspublisherserver: ['@nsshunt/stspublisherserver'],
45
+ stsutils: ['@nsshunt/stsutils'],
46
+ axios: ['axios'],
47
+ jwtdecode: ['jwt-decode']
48
+ }
49
+ }
50
+ }
51
+ */
52
+ },
53
+
54
+ base: '/',
55
+
56
+ worker: {
57
+ format: 'es'
58
+ }
59
+
60
+ });
61
+ }
62
+