GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Made changes as requested · webpack/webpack@5b5f1d4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/debug
    • ProfilingPlugin.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/debug/ProfilingPlugin.js‎

Copy file name to clipboardExpand all lines: lib/debug/ProfilingPlugin.js
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const fs = require("fs");
22
const path = require("path");
3+
const mkdirp = require("mkdirp");
34
const { Tracer } = require("chrome-trace-event");
45
const validateOptions = require("schema-utils");
56
const schema = require("../../schemas/plugins/debug/ProfilingPlugin.json");
@@ -87,17 +88,16 @@ class Profiler {
8788

8889
/**
8990
* @param {string} outputPath The location where to write the log.
90-
* @param {Object} compiler Current compiler Instance
9191
* @returns {Trace} The trace object
9292
*/
93-
const createTrace = (outputPath, compiler) => {
93+
const createTrace = outputPath => {
9494
const trace = new Tracer({
9595
noStream: true
9696
});
9797
const profiler = new Profiler(inspector);
98-
if (outputPath.match(/\/|\\/)) {
99-
const dir = path.dirname(outputPath);
100-
compiler.outputFileSystem.mkdirp(dir);
98+
if (/\/|\\/.test(outputPath)) {
99+
const dirPath = path.dirname(outputPath);
100+
mkdirp.sync(dirPath);
101101
}
102102
const fsStream = fs.createWriteStream(outputPath);
103103

@@ -164,7 +164,7 @@ class ProfilingPlugin {
164164
}
165165

166166
apply(compiler) {
167-
const tracer = createTrace(this.outputPath, compiler);
167+
const tracer = createTrace(this.outputPath);
168168
tracer.profiler.startProfiling();
169169

170170
// Compiler Hooks

0 commit comments

Comments
0 (0)
You are visitor 01402622 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.