@gct-paas/build 0.1.4-dev.5 → 0.1.4-dev.6

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.
@@ -7,7 +7,6 @@ exports.defineViteBaseConfig = defineViteBaseConfig;
7
7
  var _vite = require("vite");
8
8
  var _pluginVue = _interopRequireDefault(require("@vitejs/plugin-vue"));
9
9
  var _pluginVueJsx = _interopRequireDefault(require("@vitejs/plugin-vue-jsx"));
10
- var _pluginBabel = require("@rollup/plugin-babel");
11
10
  var _pluginJson = _interopRequireDefault(require("@rollup/plugin-json"));
12
11
  var _path = _interopRequireDefault(require("path"));
13
12
  var _constants = require("../../constants/index.cjs");
@@ -30,19 +29,27 @@ function defineViteBaseConfig(opts = {}) {
30
29
  external: _constants.DEFAULT_EXTERNAL
31
30
  }
32
31
  },
33
- plugins: [(0, _pluginJson.default)(), (0, _pluginVue.default)(), (0, _pluginVueJsx.default)(), (0, _pluginBabel.babel)({
34
- babelHelpers: "bundled",
35
- presets: [["@babel/preset-env", {
36
- useBuiltIns: "usage",
37
- corejs: 3,
38
- bugfixes: true,
39
- targets: {
40
- chrome: "85",
41
- edge: "85",
42
- firefox: "79",
43
- safari: "14.1"
44
- }
45
- }]]
46
- })]
32
+ plugins: [(0, _pluginJson.default)(), (0, _pluginVue.default)(), (0, _pluginVueJsx.default)()
33
+ // 关系 babel 配置,这个配置要放在具体的 project vite 编译配置中,底包应该是干净的
34
+ // babel({
35
+ // babelHelpers: 'bundled',
36
+ // presets: [
37
+ // [
38
+ // '@babel/preset-env',
39
+ // {
40
+ // useBuiltIns: false,
41
+ // corejs: 3,
42
+ // bugfixes: true,
43
+ // targets: {
44
+ // chrome: '85',
45
+ // edge: '85',
46
+ // firefox: '79',
47
+ // safari: '14.1',
48
+ // },
49
+ // },
50
+ // ],
51
+ // ],
52
+ // }),
53
+ ]
47
54
  }), opts);
48
55
  }
@@ -46,6 +46,7 @@ function defineProjectViteConfig(gctOpts = {}, opts = {}) {
46
46
  }) || "paas-dev";
47
47
  const httpProxy = _gctOpts.httpProxyConfig[httpProxyKey];
48
48
  return (0, _util.mergeConfig)({
49
+ base: "./",
49
50
  resolve: {
50
51
  alias: {
51
52
  "@": _path.default.resolve(cwd, "src")
@@ -53,7 +54,7 @@ function defineProjectViteConfig(gctOpts = {}, opts = {}) {
53
54
  },
54
55
  build: {
55
56
  rollupOptions: {
56
- external: ["core-js", "vue", "vue-i18n", "vue-router", "ant-design-vue", "pinia", "systemjs", "@gct-paas/core", "@gct-paas/core-web", "@gct-paas/api"]
57
+ external: ["axios", "dayjs", "pinia", "lodash-es", "vue", "vue-i18n", "vue-router", "ant-design-vue", "pinia", "systemjs", "@gct-paas/core", "@gct-paas/core-web", "@gct-paas/api"]
57
58
  }
58
59
  },
59
60
  css: {
@@ -1,7 +1,6 @@
1
1
  import { defineConfig } from "vite";
2
2
  import vue from "@vitejs/plugin-vue";
3
3
  import vueJsx from "@vitejs/plugin-vue-jsx";
4
- import { babel } from "@rollup/plugin-babel";
5
4
  import json from "@rollup/plugin-json";
6
5
  import path from "path";
7
6
  import { DEFAULT_EXTERNAL } from "../../constants/index.mjs";
@@ -27,26 +26,27 @@ export function defineViteBaseConfig(opts = {}) {
27
26
  plugins: [
28
27
  json(),
29
28
  vue(),
30
- vueJsx(),
31
- babel({
32
- babelHelpers: "bundled",
33
- presets: [
34
- [
35
- "@babel/preset-env",
36
- {
37
- useBuiltIns: "usage",
38
- corejs: 3,
39
- bugfixes: true,
40
- targets: {
41
- chrome: "85",
42
- edge: "85",
43
- firefox: "79",
44
- safari: "14.1"
45
- }
46
- }
47
- ]
48
- ]
49
- })
29
+ vueJsx()
30
+ // 关系 babel 配置,这个配置要放在具体的 project vite 编译配置中,底包应该是干净的
31
+ // babel({
32
+ // babelHelpers: 'bundled',
33
+ // presets: [
34
+ // [
35
+ // '@babel/preset-env',
36
+ // {
37
+ // useBuiltIns: false,
38
+ // corejs: 3,
39
+ // bugfixes: true,
40
+ // targets: {
41
+ // chrome: '85',
42
+ // edge: '85',
43
+ // firefox: '79',
44
+ // safari: '14.1',
45
+ // },
46
+ // },
47
+ // ],
48
+ // ],
49
+ // }),
50
50
  ]
51
51
  }),
52
52
  opts
@@ -40,6 +40,7 @@ export function defineProjectViteConfig(gctOpts = {}, opts = {}) {
40
40
  const httpProxy = _gctOpts.httpProxyConfig[httpProxyKey];
41
41
  return mergeConfig(
42
42
  {
43
+ base: "./",
43
44
  resolve: {
44
45
  alias: {
45
46
  "@": path.resolve(cwd, "src")
@@ -48,7 +49,10 @@ export function defineProjectViteConfig(gctOpts = {}, opts = {}) {
48
49
  build: {
49
50
  rollupOptions: {
50
51
  external: [
51
- "core-js",
52
+ "axios",
53
+ "dayjs",
54
+ "pinia",
55
+ "lodash-es",
52
56
  "vue",
53
57
  "vue-i18n",
54
58
  "vue-router",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/build",
3
- "version": "0.1.4-dev.5",
3
+ "version": "0.1.4-dev.6",
4
4
  "type": "module",
5
5
  "description": "paas 平台核心包",
6
6
  "main": "dist/index.cjs",
@@ -44,7 +44,7 @@
44
44
  "@commitlint/cli": "^19.8.1",
45
45
  "@commitlint/config-conventional": "^19.8.1",
46
46
  "@eslint/js": "^9.33.0",
47
- "@gct-paas/scss": "^0.1.4-dev.5",
47
+ "@gct-paas/scss": "^0.1.4-dev.6",
48
48
  "@inquirer/prompts": "^7.8.3",
49
49
  "@rollup/plugin-babel": "^6.0.4",
50
50
  "@rollup/plugin-commonjs": "^28.0.6",
@@ -100,5 +100,5 @@
100
100
  "typescript": "^5.9.2",
101
101
  "unbuild": "^3.6.1"
102
102
  },
103
- "gitHead": "6fd4f6f4c3a0e1bd1fc4eea78fa9c2760e2219be"
103
+ "gitHead": "89142a76f256070c57ff8a6dcf062eba397f797a"
104
104
  }