Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduced memory usage #781

Merged
merged 2 commits into from
May 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
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