@easyv/react-component-builder 0.22.3 → 0.23.0-beta.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.
@@ -24,8 +24,7 @@ module.exports = (
24
24
  output: {
25
25
  path: appBuild,
26
26
  filename: `${module_name}.${version}.js`,
27
- library: `${module_name}@${version}`,
28
- libraryTarget: 'amd',
27
+ library: { name: `${module_name}@${version}`, type: 'amd' },
29
28
  },
30
29
  externals: [
31
30
  'react',
@@ -54,9 +54,7 @@ module.exports = function ({ isProduction, uniqueId, entrys }) {
54
54
 
55
55
  {
56
56
  test: /\.js\.map$/,
57
- use: {
58
- loader: "file-loader",
59
- },
57
+ type: "asset/resource",
60
58
  },
61
59
 
62
60
  {
@@ -104,11 +102,12 @@ module.exports = function ({ isProduction, uniqueId, entrys }) {
104
102
  ],
105
103
  },
106
104
  {
107
- // exclude: /node_modules/,
108
105
  test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)(\?.*$|$)/,
109
- loader: "url-loader",
110
- options: {
111
- limit: 20 * 1024 * 1024,
106
+ type: "asset",
107
+ parser: {
108
+ dataUrlCondition: {
109
+ maxSize: 20 * 1024 * 1024,
110
+ },
112
111
  },
113
112
  },
114
113
  ].filter(Boolean),
@@ -34,8 +34,7 @@ module.exports = ({ port, modules }) => {
34
34
  output: {
35
35
  filename: '[name].js',
36
36
  globalObject: 'this',
37
- libraryTarget: 'var',
38
- library: '__MAIN__', // 暴露到window上的属性名称
37
+ library: { name: '__MAIN__', type: 'var' }, // 暴露到window上的属性名称
39
38
  },
40
39
  devtool: 'source-map',
41
40
  plugins: [
@@ -75,7 +74,7 @@ module.exports = ({ port, modules }) => {
75
74
  client: {
76
75
  logging: 'warn',
77
76
  },
78
- onBeforeSetupMiddleware: function (devServer) {
77
+ setupMiddlewares: (middlewares, devServer) => {
79
78
  if (!devServer) {
80
79
  throw new Error('webpack-dev-server is not defined');
81
80
  }
@@ -118,6 +117,7 @@ module.exports = ({ port, modules }) => {
118
117
  res.send(data);
119
118
  });
120
119
  });
120
+ return middlewares;
121
121
  },
122
122
  },
123
123
  };
package/launcher/build.js CHANGED
@@ -110,8 +110,10 @@ module.exports = (name, option = {}) => {
110
110
 
111
111
  console.log();
112
112
  }
113
+ const mainAsset = message.assetsByChunkName.main;
114
+ const mainFile = Array.isArray(mainAsset) ? mainAsset[0] : mainAsset;
113
115
  resolve({
114
- file: path.join(message.outputPath, message.assetsByChunkName.main),
116
+ file: path.join(message.outputPath, mainFile),
115
117
  base,
116
118
  sourcePath: sourcePath,
117
119
  });
package/launcher/start.js CHANGED
@@ -124,9 +124,10 @@ function start({ port, modules }) {
124
124
  },
125
125
  });
126
126
 
127
- const server = new WebpackDevServer(compiler, config.devServer);
127
+ const devServerOptions = { ...config.devServer, host: HOST };
128
+ const server = new WebpackDevServer(devServerOptions, compiler);
128
129
 
129
- server.listen(port, HOST, (err) => {
130
+ server.startCallback((err) => {
130
131
  if (err) {
131
132
  return console.log(err);
132
133
  }
@@ -140,8 +141,7 @@ function start({ port, modules }) {
140
141
 
141
142
  ['SIGINT', 'SIGTERM'].forEach(function (sig) {
142
143
  process.on(sig, function () {
143
- server.close();
144
- process.exit();
144
+ server.stopCallback(() => process.exit());
145
145
  });
146
146
  });
147
147
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/react-component-builder",
3
- "version": "0.22.3",
3
+ "version": "0.23.0-beta.0",
4
4
  "files": [
5
5
  "launcher",
6
6
  "templates",
@@ -17,41 +17,37 @@
17
17
  "postpublish": "sync-to-mirror"
18
18
  },
19
19
  "dependencies": {
20
- "@babel/core": "7.9.0",
20
+ "@babel/core": "^7.12.0",
21
21
  "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
22
22
  "@babel/register": "^7.10.4",
23
23
  "@easyv/react-gui": "1.20.9",
24
- "@easyv/simulator": "0.6.2",
24
+ "@easyv/simulator": "0.6.3",
25
25
  "@svgr/webpack": "8.1.0",
26
26
  "acorn": "^7.3.1",
27
27
  "acorn-jsx": "^5.2.0",
28
28
  "antd": "^4.0.3",
29
- "babel-loader": "8.1.0",
29
+ "babel-loader": "^9.2.0",
30
30
  "babel-plugin-named-asset-import": "^0.3.6",
31
31
  "babel-preset-react-app": "^10.0.1",
32
32
  "classnames": "^2.2.6",
33
- "css-loader": "3.4.2",
33
+ "css-loader": "^6.11.0",
34
34
  "d3": "^5.16.0",
35
- "expose-loader": "^1.0.0",
36
- "file-loader": "4.3.0",
35
+ "expose-loader": "^4.0.0",
37
36
  "filesize": "^6.1.0",
38
37
  "fs-extra": "^9.0.1",
39
38
  "glob": "^7.1.6",
40
- "html-webpack-plugin": "4.5.2",
39
+ "html-webpack-plugin": "^5.6.0",
41
40
  "inquirer": "^7.3.0",
42
- "less-loader": "^6.2.0",
41
+ "less-loader": "^11.1.0",
43
42
  "lodash": "^4.17.19",
44
43
  "multer": "^1.4.2",
45
- "optimize-css-assets-webpack-plugin": "6.0.1",
46
44
  "react": "^16.13.1",
47
45
  "react-dev-utils": "10.2.1",
48
46
  "react-dom": "^16.13.1",
49
- "style-loader": "0.23.1",
47
+ "style-loader": "^3.3.0",
50
48
  "three": "^0.100.0",
51
- "url-loader": "2.3.0",
52
- "webpack": "4.47.0",
53
- "webpack-dev-server": "4.15.1",
54
- "webpack-manifest-plugin": "4.1.1"
49
+ "webpack": "^5.96.0",
50
+ "webpack-dev-server": "^5.1.0"
55
51
  },
56
52
  "devDependencies": {
57
53
  "@easyv/sync-to-mirror": "^0.0.2",
@@ -59,7 +55,8 @@
59
55
  "@types/node": "^12.0.0",
60
56
  "@types/react": "^16.9.0",
61
57
  "@types/react-dom": "^16.9.0",
62
- "terser-webpack-plugin": "^4.2.3"
58
+ "cesium": "^1.138.0",
59
+ "terser-webpack-plugin": "^5.3.10"
63
60
  },
64
61
  "easyv": {
65
62
  "src": "examples",
@@ -69,7 +66,7 @@
69
66
  "online": "https://easyv.dtstack.com",
70
67
  "test": "http://172.16.10.70:1337"
71
68
  },
72
- "assets": "https://easyv-develop.oss-cn-hangzhou.aliyuncs.com/"
69
+ "assets": "https://dt-easyv-prod.oss-cn-hangzhou.aliyuncs.com/"
73
70
  },
74
71
  "publishConfig": {
75
72
  "registry": "https://registry.npmjs.org/"