@easyv/react-component-builder 0.23.0-beta.0 → 0.23.1

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