Skip to content

Commit

Permalink
refactor: use require for debug dependency
Browse files Browse the repository at this point in the history
So that the lines can be properly excluded by the webpack-remove-debug
loader ([1]).

[1] https://github.com/johngodley/webpack-remove-debug
  • Loading branch information
darrachequesne committed Oct 5, 2020
1 parent 091d25e commit 9eb8561
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ exports.Decoder = exports.Encoder = exports.PacketType = exports.protocol = void
const component_emitter_1 = __importDefault(require("component-emitter"));
const binary_1 = require("./binary");
const is_binary_1 = __importDefault(require("./is-binary"));
const debug_1 = __importDefault(require("debug"));
const debug = debug_1.default("socket.io-parser");
const debug = require("debug")("socket.io-parser");
/**
* Protocol version.
*
Expand Down
3 changes: 1 addition & 2 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import Emitter from "component-emitter";
import { deconstructPacket, reconstructPacket } from "./binary";
import isBinary from "./is-binary";
import debugModule from "debug";

const debug = debugModule("socket.io-parser");
const debug = require("debug")("socket.io-parser");

/**
* Protocol version.
Expand Down

0 comments on commit 9eb8561

Please sign in to comment.