@ray-js/builder-mp 1.6.24 → 1.6.26

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/lib/build.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import webpack from 'webpack';
2
- import { API, CliOptions } from '@ray-js/types';
1
+ import type webpack from 'webpack';
2
+ import type { API, CliOptions } from '@ray-js/types';
3
3
  export default function build(options: CliOptions, context: {
4
4
  api: API;
5
5
  }): Promise<webpack.Compiler>;
package/lib/build.js CHANGED
@@ -34,7 +34,7 @@ function build(options, context) {
34
34
  shared_1.log.info(LOG_PREFIX, 'cwd:'.green, cwd.underline);
35
35
  shared_1.log.info(LOG_PREFIX, 'outputDir:'.green, output.underline);
36
36
  if (devtools) {
37
- shared_1.log.info(LOG_PREFIX, '开启 devtools 开发者工具环境变量'.yellow, devtools);
37
+ shared_1.log.info(LOG_PREFIX, shared_1.i18n.__('devtools').yellow, devtools);
38
38
  }
39
39
  const rayCoreOpts = (0, ray_core_1.getRayCoreOptions)();
40
40
  const rayApi = new ray_core_1.RayAPI(rayCoreOpts);
package/lib/build.rjs.js CHANGED
@@ -90,6 +90,8 @@ class RjsBuild {
90
90
  {
91
91
  'process.env.NODE_ENV': JSON.stringify(nodeEnv),
92
92
  'process.env.PLATFORM': JSON.stringify(target),
93
+ 'process.env.IDE_LANG': JSON.stringify(process.env.IDE_LANG || ''),
94
+ 'process.env.MINIPACK_LANG': JSON.stringify(process.env.MINIPACK_LANG || ''),
93
95
  },
94
96
  ])
95
97
  .end()
@@ -77,6 +77,8 @@ class WorkerBuild {
77
77
  {
78
78
  'process.env.NODE_ENV': JSON.stringify(nodeEnv),
79
79
  'process.env.PLATFORM': JSON.stringify(target),
80
+ 'process.env.IDE_LANG': JSON.stringify(process.env.IDE_LANG),
81
+ 'process.env.MINIPACK_LANG': JSON.stringify(process.env.MINIPACK_LANG),
80
82
  },
81
83
  ])
82
84
  .end()
@@ -39,7 +39,9 @@ exports.default = {
39
39
  const { target } = builder_1.builder.options;
40
40
  alias('ray', '@ray-js/ray', config);
41
41
  // 修改 mini-css-extract-plugin 的配置
42
- config.plugin('mini-css-extract-plugin').tap(([options]) => [Object.assign(Object.assign({}, options), { ignoreOrder: true })]);
42
+ config
43
+ .plugin('mini-css-extract-plugin')
44
+ .tap(([options]) => [Object.assign(Object.assign({}, options), { ignoreOrder: true })]);
43
45
  // 收敛 babel.config 配置
44
46
  // 调整 ray-core 的 babel 配置
45
47
  config.module
@@ -72,7 +74,7 @@ exports.default = {
72
74
  .end();
73
75
  config.plugin('webpack-define-plugin').tap(([args]) => {
74
76
  return [
75
- Object.assign(Object.assign({}, args), { 'process.env.PLATFORM': JSON.stringify(target), 'process.env.RAY_DEBUG': JSON.stringify(`${process.env.RAY_DEBUG === 'true'}`) }),
77
+ Object.assign(Object.assign({}, args), { 'process.env.PLATFORM': JSON.stringify(target), 'process.env.RAY_DEBUG': JSON.stringify(`${process.env.RAY_DEBUG === 'true'}`), 'process.env.IDE_LANG': JSON.stringify(process.env.IDE_LANG || ''), 'process.env.MINIPACK_LANG': JSON.stringify(process.env.MINIPACK_LANG || '') }),
76
78
  ];
77
79
  });
78
80
  config.resolve.alias.set('@ray-core/ray', path_1.default.dirname(require.resolve('@ray-core/ray/package.json')));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/builder-mp",
3
- "version": "1.6.24",
3
+ "version": "1.6.26",
4
4
  "description": "Ray builder for mini program",
5
5
  "keywords": [
6
6
  "ray"
@@ -33,10 +33,10 @@
33
33
  "@ray-core/build-store": "^0.4.8",
34
34
  "@ray-core/cli": "^0.4.8",
35
35
  "@ray-core/ray": "^0.4.8",
36
- "@ray-js/adapter": "1.6.24",
36
+ "@ray-js/adapter": "1.6.26",
37
37
  "@ray-js/rjs-for-wechat": "^0.0.3",
38
- "@ray-js/shared": "1.6.24",
39
- "@ray-js/types": "1.6.24",
38
+ "@ray-js/shared": "1.6.26",
39
+ "@ray-js/types": "1.6.26",
40
40
  "babel-loader": "^8.4.1",
41
41
  "babel-plugin-minify-dead-code-elimination": "^0.5.2",
42
42
  "babel-plugin-transform-prune-unused-imports": "^1.0.1",
@@ -56,15 +56,15 @@
56
56
  "devDependencies": {
57
57
  "@ray-core/types": "^0.4.8",
58
58
  "@types/jest": "^29.5.14",
59
- "@types/node": "^20.17.6",
59
+ "@types/node": "^20.17.24",
60
60
  "babel-plugin-tester": "^10.1.0",
61
61
  "jest": "^29.7.0",
62
- "ts-jest": "^29.2.5",
63
- "typescript": "^5.7.2"
62
+ "ts-jest": "^29.2.6",
63
+ "typescript": "^5.8.2"
64
64
  },
65
65
  "publishConfig": {
66
66
  "access": "public",
67
67
  "registry": "https://registry.npmjs.com"
68
68
  },
69
- "gitHead": "9d1aef04d0004295179fb3d9f011b0d3e4018f87"
69
+ "gitHead": "d842231dd15303495069483a809a71dbc640ebaf"
70
70
  }