Skip to content

Commit 9eb8561

Browse files
refactor: use require for debug dependency
So that the lines can be properly excluded by the webpack-remove-debug loader ([1]). [1] https://github.com/johngodley/webpack-remove-debug
1 parent 091d25e commit 9eb8561

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

dist/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ exports.Decoder = exports.Encoder = exports.PacketType = exports.protocol = void
77
const component_emitter_1 = __importDefault(require("component-emitter"));
88
const binary_1 = require("./binary");
99
const is_binary_1 = __importDefault(require("./is-binary"));
10-
const debug_1 = __importDefault(require("debug"));
11-
const debug = debug_1.default("socket.io-parser");
10+
const debug = require("debug")("socket.io-parser");
1211
/**
1312
* Protocol version.
1413
*

lib/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import Emitter from "component-emitter";
22
import { deconstructPacket, reconstructPacket } from "./binary";
33
import isBinary from "./is-binary";
4-
import debugModule from "debug";
54

6-
const debug = debugModule("socket.io-parser");
5+
const debug = require("debug")("socket.io-parser");
76

87
/**
98
* Protocol version.

0 commit comments

Comments
 (0)