@ray-js/builder-web 1.3.99-beta.2 → 1.3.99-beta.4

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.
Files changed (2) hide show
  1. package/lib/build.js +2 -12
  2. package/package.json +5 -5
package/lib/build.js CHANGED
@@ -51,7 +51,6 @@ const webpack_dev_server_1 = __importDefault(require("webpack-dev-server"));
51
51
  const webpackbar_1 = __importDefault(require("webpackbar"));
52
52
  const shared_1 = require("@ray-js/shared");
53
53
  const crypto = __importStar(require("crypto"));
54
- const css_1 = require("@ray-core/cli/lib/build/webpack/config/css");
55
54
  const process_css_1 = require("./loaders/process-css");
56
55
  const process_less_1 = require("./loaders/process-less");
57
56
  function hash(path) {
@@ -177,7 +176,7 @@ function build(options, context) {
177
176
  },
178
177
  });
179
178
  config.performance.hints(false);
180
- config.plugin('webpack-define-plugin').use(webpack_1.default.DefinePlugin, [
179
+ config.plugin('defined').use(webpack_1.default.DefinePlugin, [
181
180
  {
182
181
  'process.env.NODE_ENV': JSON.stringify(mode),
183
182
  'process.env.PLATFORM': JSON.stringify(target),
@@ -234,16 +233,7 @@ function build(options, context) {
234
233
  else {
235
234
  config.set('externals', Object.assign(Object.assign({}, externals), internalExternals));
236
235
  }
237
- const opts = Object.assign(Object.assign({}, compileOptions), { rootDir: compileOptions.source });
238
- delete opts.source; // ray-core 中 rootDir 等同于 ray-js 中 source
239
- // todo 未开启 css modules
240
- api.callPluginMethod('configWebpack', {
241
- config,
242
- addCSSRule: (ruleConfig) => {
243
- (0, css_1.addCSSRule)(config, { options: opts }, true, ruleConfig);
244
- },
245
- options: opts
246
- });
236
+ api.callPluginMethod('configWebpack', { config });
247
237
  if (watch) {
248
238
  const defaultHttpPort = parseInt(port);
249
239
  const httpPort = yield (0, detect_port_1.default)(defaultHttpPort);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/builder-web",
3
- "version": "1.3.99-beta.2",
3
+ "version": "1.3.99-beta.4",
4
4
  "description": "Ray builder for web",
5
5
  "keywords": [
6
6
  "ray"
@@ -21,9 +21,9 @@
21
21
  "watch": "tsc -p ./tsconfig.build.json --watch"
22
22
  },
23
23
  "dependencies": {
24
- "@ray-js/babel-preset-standard": "^1.3.99-beta.2",
25
- "@ray-js/shared": "^1.3.99-beta.2",
26
- "@ray-js/types": "^1.3.99-beta.2",
24
+ "@ray-js/babel-preset-standard": "^1.3.99-beta.4",
25
+ "@ray-js/shared": "^1.3.99-beta.4",
26
+ "@ray-js/types": "^1.3.99-beta.4",
27
27
  "address": "^1.1.2",
28
28
  "autoprefixer": "9.x",
29
29
  "case-sensitive-paths-webpack-plugin": "^2.4.0",
@@ -58,6 +58,6 @@
58
58
  "email": "tuyafe@tuya.com"
59
59
  }
60
60
  ],
61
- "gitHead": "c129b96e800e9bb062bdbb1236c05cb800fdc34b",
61
+ "gitHead": "d7023ac947690654dc0c20e8bc7c292f16005236",
62
62
  "repository": {}
63
63
  }