@ray-js/builder-web 1.3.99-beta.2 → 1.3.99-beta.3
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/build.js +2 -12
- 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('
|
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
|
-
|
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.
|
3
|
+
"version": "1.3.99-beta.3",
|
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.
|
25
|
-
"@ray-js/shared": "^1.3.99-beta.
|
26
|
-
"@ray-js/types": "^1.3.99-beta.
|
24
|
+
"@ray-js/babel-preset-standard": "^1.3.99-beta.3",
|
25
|
+
"@ray-js/shared": "^1.3.99-beta.3",
|
26
|
+
"@ray-js/types": "^1.3.99-beta.3",
|
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": "
|
61
|
+
"gitHead": "fb0a79e1296c9f6311467d9c00634654f0136644",
|
62
62
|
"repository": {}
|
63
63
|
}
|