Skip to content

Commit

Permalink
Tweak create-config args
Browse files Browse the repository at this point in the history
  • Loading branch information
simonihmig committed Feb 2, 2023
1 parent d5de521 commit 3aba9bb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions create-config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
function createEmberCLIConfig(enabled) {
const isEnabled = enabled ?? !!process.env.ENABLE_BUNDLE_ANALYZER;
function createEmberCLIConfig(forceEnabled = undefined, ownConfig = {}) {
const isEnabled = forceEnabled ?? !!process.env.ENABLE_BUNDLE_ANALYZER;

return isEnabled
? {
bundleAnalyzer: {
enabled: true,
...ownConfig,
},
sourcemaps: { enabled: true },
autoImport: {
Expand All @@ -14,8 +15,8 @@ function createEmberCLIConfig(enabled) {
: {};
}

function createWebpackConfig(enabled) {
const isEnabled = enabled ?? !!process.env.ENABLE_BUNDLE_ANALYZER;
function createWebpackConfig(forceEnabled) {
const isEnabled = forceEnabled ?? !!process.env.ENABLE_BUNDLE_ANALYZER;

return isEnabled
? {
Expand Down

0 comments on commit 3aba9bb

Please sign in to comment.