@promoboxx/react-scripts-vite 0.1.13 → 0.1.16

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/dist/cli.js CHANGED
@@ -11,31 +11,35 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  var child_process_1 = require("child_process");
14
+ function main(command, args) {
15
+ switch (command) {
16
+ case 'start':
17
+ spawnAndExit('./node_modules/.bin/vite', args);
18
+ break;
19
+ case 'test':
20
+ spawnAndExit('./node_modules/.bin/vitest', args);
21
+ break;
22
+ case 'build':
23
+ spawnAndExit('./node_modules/.bin/vite', __spreadArray(['build'], args, true));
24
+ break;
25
+ default:
26
+ throw new Error("Unknown command: ".concat(command));
27
+ }
28
+ }
29
+ function spawnAndExit(command, args) {
30
+ if (args === void 0) { args = []; }
31
+ var child = (0, child_process_1.spawn)(command, args, {
32
+ stdio: 'inherit',
33
+ // shell: true,
34
+ });
35
+ child.on('exit', function (code) {
36
+ process.exit(code !== null && code !== void 0 ? code : undefined);
37
+ });
38
+ }
14
39
  var _a = process.argv,
15
40
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
16
41
  _interpreter = _a[0],
17
42
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
18
43
  _thisFile = _a[1], command = _a[2], args = _a.slice(3);
19
- switch (command) {
20
- case 'start':
21
- (0, child_process_1.spawn)('./node_modules/.bin/vite', args, {
22
- stdio: 'inherit',
23
- // shell: true,
24
- });
25
- break;
26
- case 'test':
27
- (0, child_process_1.spawn)('./node_modules/.bin/vitest', args, {
28
- stdio: 'inherit',
29
- // shell: true,
30
- });
31
- break;
32
- case 'build':
33
- (0, child_process_1.spawn)('./node_modules/.bin/vite', __spreadArray(['build'], args, true), {
34
- stdio: 'inherit',
35
- // shell: true,
36
- });
37
- break;
38
- default:
39
- throw new Error("Unknown command: ".concat(command));
40
- }
44
+ main(command, args);
41
45
  //# sourceMappingURL=cli.js.map
package/dist/index.d.ts CHANGED
@@ -0,0 +1 @@
1
+ export { default as viteConfig } from './viteConfig';
package/dist/index.js CHANGED
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.viteConfig = void 0;
7
+ var viteConfig_1 = require("./viteConfig");
8
+ Object.defineProperty(exports, "viteConfig", { enumerable: true, get: function () { return __importDefault(viteConfig_1).default; } });
2
9
  //# sourceMappingURL=index.js.map
@@ -16,10 +16,8 @@ exports.default = (0, config_1.defineConfig)({
16
16
  },
17
17
  plugins: [
18
18
  // React specific.
19
- // process.env.NODE_ENV !== 'test' && reactRefresh(),
20
19
  (0, plugin_react_1.default)(),
21
20
  (0, vite_plugin_svgr_1.default)(),
22
- // reactJsx(),
23
21
  // import.meta.env -> process.env
24
22
  (0, vite_plugin_env_compatible_1.default)(),
25
23
  // Support TypeScript paths.
@@ -34,12 +32,9 @@ exports.default = (0, config_1.defineConfig)({
34
32
  enableBuild: true,
35
33
  }),
36
34
  ],
37
- resolve: {
38
- alias: {
39
- // This fixes weird styling issues with material-ui.
40
- '@material-ui/core': '@material-ui/core/esm',
41
- '@material-ui/icons': '@material-ui/icons/esm',
42
- },
35
+ server: {
36
+ open: true,
37
+ host: '0.0.0.0',
43
38
  },
44
39
  test: {
45
40
  globals: true,
@@ -47,54 +42,4 @@ exports.default = (0, config_1.defineConfig)({
47
42
  setupFiles: './src/test/setup.ts',
48
43
  },
49
44
  });
50
- //
51
- //
52
- //
53
- //
54
- //
55
- //
56
- //
57
- //
58
- //
59
- // import react from '@vitejs/plugin-react'
60
- // import { UserConfig } from 'vite'
61
- // import pluginChecker from 'vite-plugin-checker'
62
- // import envCompatible from 'vite-plugin-env-compatible'
63
- // import svgr from 'vite-plugin-svgr'
64
- // import tsconfigPaths from 'vite-tsconfig-paths'
65
- // const viteConfig: UserConfig = {
66
- // build: {
67
- // outDir: 'build',
68
- // sourcemap: true,
69
- // },
70
- // plugins: [
71
- // // React specific.
72
- // react(),
73
- // svgr(),
74
- // // import.meta.env -> process.env
75
- // envCompatible(),
76
- // // Support TypeScript paths.
77
- // tsconfigPaths(),
78
- // // Check for issues.
79
- // // TODO
80
- // // https://github.com/fi3ework/vite-plugin-checker/issues/68
81
- // pluginChecker({
82
- // eslint: {
83
- // lintCommand: `eslint --max-warnings=${
84
- // process.env.CI === 'true' ? 0 : -1
85
- // } "./src/**/*.{ts,tsx,js,jsx,mjs}"`,
86
- // },
87
- // typescript: true,
88
- // enableBuild: true,
89
- // }),
90
- // ],
91
- // resolve: {
92
- // alias: {
93
- // // This fixes weird styling issues with material-ui.
94
- // '@material-ui/core': '@material-ui/core/esm',
95
- // '@material-ui/icons': '@material-ui/icons/esm',
96
- // },
97
- // },
98
- // }
99
- // export default viteConfig
100
45
  //# sourceMappingURL=viteConfig.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promoboxx/react-scripts-vite",
3
- "version": "0.1.13",
3
+ "version": "0.1.16",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "keywords": [],