File: 05-is-webpack-bundle.diff

package info (click to toggle)
node-yarnpkg 1.22.19%2B~cs24.27.18-2%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 94,132 kB
  • sloc: javascript: 42,973; sh: 335; makefile: 21
file content (15 lines) | stat: -rw-r--r-- 525 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Description: Patch away one-liner module is-webpack-bundle
Forwarded: not-needed
Author: Paolo Greppi <paolo.greppi@libpf.com>

--- a/src/constants.js
+++ b/src/constants.js
@@ -4,7 +4,7 @@
 const path = require('path');
 const userHome = require('./util/user-home-dir').default;
 const {getCacheDir, getConfigDir, getDataDir} = require('./util/user-dirs');
-const isWebpackBundle = require('is-webpack-bundle');
+const isWebpackBundle = typeof __webpack_require__ !== "undefined";
 
 type Env = {
   [key: string]: ?string,