Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Dec 17, 2019
1 parent 7be52c6 commit 3c2e941
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/cli/src/bin/auto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ import path from 'path';

try {
// eslint-disable-next-line
const json = JSON.parse(require(path.join(__dirname, '../../package.json')));
const json = require(path.join(__dirname, '../../package.json'));

if (json.name.startsWith('@auto-canary')) {
moduleAlias.addAliases({
'@auto-it': (fromPath: string, request: string, alias: string) => {
return request.startsWith(alias)
? request.replace(alias, '@auto-canary')
: '@auto-it';
}
'@auto-it': (fromPath: string, request: string) =>
request.startsWith('@auto-it') ? '@auto-canary' : '@auto-it'
});
}
} catch (error) {}
Expand Down

0 comments on commit 3c2e941

Please sign in to comment.