Skip to content

Commit 2a21434

Browse files
author
Guillaume Chau
committed
fix(ui): put temp stats files in node_modules
1 parent 8753971 commit 2a21434

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/@vue/cli-service/lib/webpack/DashboardPlugin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class DashboardPlugin {
176176
}
177177
])
178178

179-
const statsFile = path.resolve(process.cwd(), `.stats-${this.type}.json`)
179+
const statsFile = path.resolve(process.cwd(), `./node_modules/.stats-${this.type}.json`)
180180
fs.writeJson(statsFile, {
181181
errors: hasErrors,
182182
warnings: stats.hasWarnings(),

packages/@vue/cli-ui/ui-defaults/tasks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = api => {
2323
for (const data of message.webpackDashboardData.value) {
2424
if (data.type === 'stats') {
2525
// Stats are read from a file
26-
const statsFile = path.resolve(process.cwd(), `.stats-${type}.json`)
26+
const statsFile = path.resolve(process.cwd(), `./node_modules/.stats-${type}.json`)
2727
const value = await fs.readJson(statsFile)
2828
setSharedData(`${type}-${data.type}`, value)
2929
await fs.remove(statsFile)

0 commit comments

Comments
 (0)