-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #747 from embroider-build/better-custom-babel-skip…
…ping better skipping of unnecessary stage1 transforms
- Loading branch information
Showing
6 changed files
with
74 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { PluginItem } from '@babel/core'; | ||
|
||
export function isEmberAutoImportDynamic(item: PluginItem): boolean { | ||
let pluginPath: string; | ||
if (typeof item === 'string') { | ||
pluginPath = item; | ||
} else if (Array.isArray(item) && item.length > 0 && typeof item[0] === 'string') { | ||
pluginPath = item[0]; | ||
} else { | ||
return false; | ||
} | ||
return /(^|\/)ember-auto-import\//.test(pluginPath); | ||
} | ||
|
||
export function isCompactReexports(item: PluginItem): boolean { | ||
let pluginPath: string; | ||
if (typeof item === 'string') { | ||
pluginPath = item; | ||
} else if (Array.isArray(item) && item.length > 0 && typeof item[0] === 'string') { | ||
pluginPath = item[0]; | ||
} else { | ||
return false; | ||
} | ||
return /(^|\/)babel-plugin-compact-reexports\//.test(pluginPath); | ||
} | ||
|
||
export function isColocationPlugin(item: PluginItem): boolean { | ||
let pluginPath: string; | ||
if (typeof item === 'string') { | ||
pluginPath = item; | ||
} else if (Array.isArray(item) && item.length > 0 && typeof item[0] === 'string') { | ||
pluginPath = item[0]; | ||
} else { | ||
return false; | ||
} | ||
return /(^|\/)ember-cli-htmlbars\/lib\/colocated-babel-plugin/.test(pluginPath); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters