Skip to content

Commit 842848c

Browse files
zhangwentaomeixg
authored andcommitted
feat: support config api/components packages
1 parent e13a1e2 commit 842848c

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

packages/mars-build/src/scripts/gulpTasks.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,11 @@ function getTaskSFC(config, options) {
4545

4646
if (target === 'h5') {
4747
compile = require('../gulp-mars-h5');
48-
// for dev use local packages
49-
if (config.devConfig) {
50-
let absoluteH5Path = path.resolve(process.cwd(), 'dist-h5/src/');
51-
let absoluteCompPath = path.resolve(__filename, '../../../../mars-components/src/');
52-
let absoluteApiPath = path.resolve(__filename, '../../../../mars-api/');
53-
let devCompPath = path.relative(absoluteH5Path, absoluteCompPath);
54-
let devApiPath = path.relative(absoluteH5Path, absoluteApiPath);
55-
56-
compileOption.devApiPath = devApiPath;
57-
compileOption.devCompPath = devCompPath;
48+
// for packages
49+
if (config.packages) {
50+
const {api, components} = config.packages;
51+
compileOption.devApiPath = api;
52+
compileOption.devCompPath = components;
5853
}
5954
}
6055

0 commit comments

Comments
 (0)