xhs-mp-compiler-cli 1.6.0-beta.3 → 1.6.0-beta.5

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.
@@ -39,21 +39,25 @@ const presetRender = (chain, options) => {
39
39
  rule: {
40
40
  ml: {
41
41
  test: mlReg,
42
- use: {
43
- // 'thread-loader': {
44
- // loader: require.resolve('thread-loader'),
45
- // options: {
46
- // workers: require('os').cpus().length,
47
- // },
48
- // },
49
- 'ml-loader': {
42
+ use: Object.assign(Object.assign({}, (isProd ?
43
+ {
44
+ 'swc-loader': {
45
+ loader: require.resolve('swc-loader'),
46
+ options: {
47
+ jsc: {
48
+ // ?. ?? 运算符号从 es2020支持
49
+ target: 'es2019',
50
+ externalHelpers: false
51
+ },
52
+ }
53
+ }
54
+ } : {})), { 'ml-loader': {
50
55
  loader: require.resolve('xhs-mp-compiler-ml-loader'),
51
56
  options: {
52
57
  removeComentNode: isProd,
53
58
  vdom: enableVDom,
54
59
  },
55
- },
56
- },
60
+ } }),
57
61
  },
58
62
  [(0, getSuffixName_1.getCssSuffixName)()]: {
59
63
  test: cssReg,
@@ -123,7 +123,7 @@ function genServiceLoderScript(project, context, opts) {
123
123
  if (fs_extra_1.default.existsSync(`${projectMiniprogramPath}/app.js`) ||
124
124
  fs_extra_1.default.existsSync(`${projectMiniprogramPath}/app.ts`)) {
125
125
  modules.unshift(`const loadAppJs = () => require('${(0, loader_utils_1.formatPath)(`${projectMiniprogramPath}/app`)}');` +
126
- `globalThis['${name}'].default['app'] = globalThis.lazyAppJs ? loadAppJs : loadAppJs()`);
126
+ `globalThis['${name}'].default['app'] = globalThis.xhsLazyAppJs ? loadAppJs : loadAppJs()`);
127
127
  }
128
128
  };
129
129
  if (pkg === xhs_mp_pack_1.CONSTANTS.FULL_PKG) {
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const CONSTANTS = {
4
- PROD_BROWSERSLIST: ['ios_saf >= 10', 'chrome >= 83'],
4
+ PROD_BROWSERSLIST: ['ios_saf >= 12', 'chrome >= 83'],
5
5
  DEV_BROWSERSLIST: ['last 2 chrome version'],
6
6
  DEV_TARGETS: {
7
7
  chrome: '90',
8
8
  },
9
9
  PROD_TARGETS: {
10
10
  chrome: '83',
11
- ios: '10'
11
+ ios: '12'
12
12
  },
13
13
  ENTRY_CSS_NAME: 'app',
14
14
  FULL_PKG: 'xhs-full',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xhs-mp-compiler-cli",
3
- "version": "1.6.0-beta.3",
3
+ "version": "1.6.0-beta.5",
4
4
  "description": "xhs mp command tool.",
5
5
  "preferGlobal": true,
6
6
  "category": "esm",
@@ -82,11 +82,11 @@
82
82
  "webpack-bundle-analyzer": "^4.4.0",
83
83
  "webpack-chain": "^6.5.1",
84
84
  "webpack-sources": "^3.2.2",
85
- "xhs-mp-compiler-ml-loader": "1.6.0-beta.3",
86
- "xhs-mp-compiler-utils": "1.4.0-beta.3",
87
- "xhs-mp-pack": "^1.4.0-beta.3",
88
- "xhs-mp-project": "^1.4.0-beta.3",
89
- "xhs-mp-utils": "^1.6.0-beta.3"
85
+ "xhs-mp-compiler-ml-loader": "1.6.0-beta.5",
86
+ "xhs-mp-compiler-utils": "1.6.0-beta.5",
87
+ "xhs-mp-pack": "1.6.0-beta.5",
88
+ "xhs-mp-project": "1.6.0-beta.5",
89
+ "xhs-mp-utils": "1.6.0-beta.5"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@types/babel__generator": "7.6.3",