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

add a simple deprecation for the skipBabel setting #2243

Closed
wants to merge 1 commit into from
Closed
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
23 changes: 17 additions & 6 deletions packages/core/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,16 @@ export default interface Options {
// route templates, and controllers which are governed by splitAtRoutes).
staticAppPaths?: string[];

// By default, all modules that get imported into the app go through Babel, so
// that all code will conform with your Babel targets. This option allows you
// to turn Babel off for a particular package. You might need this to work
// around a transpiler bug or you might use this as a build-performance
// optimization if you've manually verified that a particular package doesn't
// need transpilation to be safe in your target browsers.
/**
* By default, all modules that get imported into the app go through Babel, so
* that all code will conform with your Babel targets. This option allows you
* to turn Babel off for a particular package. You might need this to work
* around a transpiler bug or you might use this as a build-performance
* optimization if you've manually verified that a particular package doesn't
* need transpilation to be safe in your target browsers.
*
* @deprecated this setting will be removed in the next version of Embroider
*/
skipBabel?: { package: string; semverRange?: string }[];

// This is a performance optimization that can help you avoid the "Your build
Expand Down Expand Up @@ -158,6 +162,13 @@ export type CoreOptionsType = Required<
Pick<Options, 'staticHelpers' | 'staticModifiers' | 'staticComponents' | 'staticInvokables'>;

export function optionsWithDefaults(options?: Options): CoreOptionsType {
if (options?.skipBabel) {
console.error(
`Setting 'skipBabel' will not be possible in the next version of Embroider.
You should resolve any issue that required you to set this manually or after you upgrade you should configure your babel.config.js as required.`
);
}

let defaults = {
splitAtRoutes: [],
staticAppPaths: [],
Expand Down
Loading