@equinor/fusion-framework-cli 7.0.12 → 7.1.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Change Log
2
2
 
3
+ ## 7.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1055](https://github.com/equinor/fusion-framework/pull/1055) [`6c2fd59e`](https://github.com/equinor/fusion-framework/commit/6c2fd59e66ff77629ce1b7ecd5fd47e799719b91) Thanks [@odinr](https://github.com/odinr)! - **Allow loading of custom vite config**
8
+
9
+ When running the CLI, allow the user to provide custom [Vite config](https://vitejs.dev/config/).
10
+ The provided config is merged with the built-in config (default generated by the CLI).
11
+
12
+ updated [documentation](https://equinor.github.io/fusion-framework/guide/app/cli.html#config)
13
+
14
+ ## 7.0.13
15
+
16
+ ### Patch Changes
17
+
18
+ - [#1002](https://github.com/equinor/fusion-framework/pull/1002) [`7f506120`](https://github.com/equinor/fusion-framework/commit/7f506120c702f157f95f477ddfc514a906176870) Thanks [@eikeland](https://github.com/eikeland)! - # Updating @equinor/fusion-react-styles
19
+
20
+ Updating dependency @equinor/fusion-react-styles to version 0.5.6.
21
+
22
+ This ads the correct equinor-font cdn link to the themeprovider.
23
+
3
24
  ## 7.0.12
4
25
 
5
26
  ### Patch Changes
@@ -1,3 +1,12 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
1
10
  import { resolve } from 'path';
2
11
  import { defineConfig, createLogger } from 'vite';
3
12
  import react from '@vitejs/plugin-react';
@@ -16,21 +25,25 @@ const createCustomLogger = () => {
16
25
  };
17
26
  return logger;
18
27
  };
19
- export const createConfig = () => {
28
+ export const loadCustomConfig = (file) => __awaiter(void 0, void 0, void 0, function* () {
29
+ const filePath = resolve(process.cwd(), file);
30
+ return (yield import(filePath)).default;
31
+ });
32
+ export const createConfig = (opt) => {
33
+ const { mode } = opt !== null && opt !== void 0 ? opt : { mode: 'development' };
20
34
  const { root, pkg } = resolvePackage();
21
35
  return defineConfig({
22
36
  plugins: [
23
37
  react(),
24
38
  tsconfigPaths(),
25
39
  EnvironmentPlugin({
26
- NODE_ENV: 'production',
40
+ NODE_ENV: mode,
27
41
  }),
28
42
  ],
29
43
  root: root,
30
44
  server: {
31
45
  middlewareMode: true,
32
46
  },
33
- mode: 'development',
34
47
  appType: 'custom',
35
48
  build: {
36
49
  outDir: resolve(root, 'dist'),
@@ -38,11 +51,7 @@ export const createConfig = () => {
38
51
  entry: resolve(root, pkg.main),
39
52
  fileName: 'app-bundle',
40
53
  formats: ['es'],
41
- },
42
- // minify: false,
43
- // terserOptions: {
44
- // mangle: false,
45
- // },
54
+ }
46
55
  },
47
56
  customLogger: createCustomLogger(),
48
57
  });