Skip to content

Commit

Permalink
Reduced memory usage (#781)
Browse files Browse the repository at this point in the history
* Update index.js

* Update index.js
  • Loading branch information
popuguytheparrot authored and danez committed May 12, 2019
1 parent f63f4d8 commit 4c02657
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Expand Up @@ -19,12 +19,12 @@ if (/^6\./.test(babel.version)) {
);
}

const pkg = require("../package.json");
const {version} = require("../package.json");
const cache = require("./cache");
const transform = require("./transform");
const injectCaller = require("./injectCaller");

const path = require("path");
const {isAbsolute} = require("path");
const loaderUtils = require("loader-utils");

function subscribe(subscriber, metadata, context) {
Expand Down Expand Up @@ -60,7 +60,7 @@ async function loader(source, inputSourceMap, overrides) {
"Customized loaders must be implemented as standalone modules.",
);
}
if (!path.isAbsolute(loaderOptions.customize)) {
if (!isAbsolute(loaderOptions.customize)) {
throw new Error(
"Customized loaders must be passed as absolute paths, since " +
"babel-loader has no way to know what they would be relative to.",
Expand Down Expand Up @@ -178,7 +178,7 @@ async function loader(source, inputSourceMap, overrides) {
cacheIdentifier = JSON.stringify({
options,
"@babel/core": transform.version,
"@babel/loader": pkg.version,
"@babel/loader": version,
}),
cacheCompression = true,
metadataSubscribers = [],
Expand Down

0 comments on commit 4c02657

Please sign in to comment.