-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Refactor]: Document #618
[Refactor]: Document #618
Changes from 14 commits
c37a9e9
03648ec
4116056
894d9ae
4240218
644e63e
eb9bf2a
a21b8e7
bf3d057
2794818
5ee6841
7360eaa
85890fd
88f44bc
ecd7af4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,7 +79,10 @@ module.exports = function (api) { | |
// Remove outputDir when start devServer | ||
const { outputDir = 'build' } = userConfig; | ||
configs.forEach((config) => { | ||
fs.emptyDirSync(path.resolve(rootDir, outputDir, config.name)); | ||
// Only empty build dir whick task configed name | ||
if (config.name) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 加一下注释 |
||
fs.emptyDirSync(path.resolve(rootDir, outputDir, config.name)); | ||
} | ||
}); | ||
|
||
logWebpackConfig(configs); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
declare module 'chalk' { | ||
export const hex: any; | ||
export const underline: any; | ||
export const red: any; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,18 +17,19 @@ | |
"rax": "^1.0.0" | ||
}, | ||
"dependencies": { | ||
"@builder/app-helpers": "^2.1.0", | ||
"@builder/mpa-config": "^3.0.0", | ||
"chalk": "^4.1.0", | ||
"cheerio": "1.0.0-rc.3", | ||
"error-stack-tracey": "^0.1.4", | ||
"fs-extra": "^9.0.1", | ||
"html-minifier": "^4.0.0", | ||
"klaw-sync": "^6.0.0", | ||
"node-hot-loader": "^1.21.0", | ||
"qs": "^6.9.4", | ||
"rax-server-renderer": "^1.2.0", | ||
"webpack-sources": "^2.0.0", | ||
"webpack": "^4.0.0", | ||
"@builder/app-helpers": "^2.1.0", | ||
"react-dev-utils": "^10.0.0", | ||
"chalk": "^4.1.0", | ||
"html-minifier": "^4.0.0", | ||
"cheerio": "1.0.0-rc.3" | ||
"webpack": "^4.0.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个依赖应该是可以移除的,底层 build-scripts 已经依赖了,如果 plugin-rax-web 有用到内置 webpack 插件的,可以从 context 上取 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 已删除,是之前的依赖 |
||
"webpack-sources": "^2.0.0" | ||
} | ||
} |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
内置任务哪个链路不会设置 name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
document 没设置,我设置下也行