-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix babel config file during prebuild
- Loading branch information
Showing
2 changed files
with
25 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,16 @@ | ||
// eslint-disable-next-line n/no-missing-require | ||
let config = require("./node_modules/.embroider/rewritten-app/_babel_config_"); | ||
|
||
let config; | ||
|
||
// TODO - remove this once we have the better solution for injecting stage1 babel config into a real config file | ||
// this is needed because there are things (like ember-composible-helpers) that are now finding our babel config during | ||
// their stage1 build and historically they will never (99% of the time) have found any babel config. | ||
// we might need to keep something like this so that prebuild will never apply babel configs during stage1 i.e. a util | ||
// function that wraps your whole babel config | ||
if (process.env.EMBROIDER_PREBUILD) { | ||
config = {}; | ||
} else { | ||
config = require("./node_modules/.embroider/rewritten-app/_babel_config_"); | ||
} | ||
|
||
module.exports = config; |
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 |
---|---|---|
@@ -1,6 +1,16 @@ | ||
// eslint-disable-next-line n/no-missing-require | ||
let config = require('./node_modules/.embroider/rewritten-app/_babel_config_'); | ||
|
||
debugger; | ||
let config; | ||
|
||
// TODO - remove this once we have the better solution for injecting stage1 babel config into a real config file | ||
// this is needed because there are things (like ember-composible-helpers) that are now finding our babel config during | ||
// their stage1 build and historically they will never (99% of the time) have found any babel config. | ||
// we might need to keep something like this so that prebuild will never apply babel configs during stage1 i.e. a util | ||
// function that wraps your whole babel config | ||
if (process.env.EMBROIDER_PREBUILD) { | ||
config = {}; | ||
} else { | ||
config = require('./node_modules/.embroider/rewritten-app/_babel_config_'); | ||
} | ||
|
||
module.exports = config; |