Skip to content

Commit

Permalink
fix bad var name
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Jan 15, 2020
1 parent ca43033 commit e3a35b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/babel-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ function getPackageVersion(package) {

function rewriteImport(imp, dir, shouldAddMissingExtension, shouldAddVersion) {
const isSourceImport = imp.startsWith('/') || imp.startsWith('.') || imp.startsWith('\\');
const isRemoteimport = imp.startsWith('http://') || imp.startsWith('https://');
const isRemoteImport = imp.startsWith('http://') || imp.startsWith('https://');
dir = dir || 'web_modules';
if (!isSourceImport && !isRemoteimport) {
if (!isSourceImport && !isRemoteImport) {
const depFileName = `${getWebDependencyName(imp)}.js`;
const depImport = path.posix.join('/', dir, depFileName);
if (!shouldAddVersion) {
Expand All @@ -29,7 +29,7 @@ function rewriteImport(imp, dir, shouldAddMissingExtension, shouldAddVersion) {
const packageVersion = getPackageVersion(imp);
return depImport + `?${VERSION_TAG}=${packageVersion}`;
}
if (!isRemoteimport && shouldAddMissingExtension && !path.extname(imp)) {
if (!isRemoteImport && shouldAddMissingExtension && !path.extname(imp)) {
return imp + '.js';
}
return imp;
Expand Down

0 comments on commit e3a35b5

Please sign in to comment.