Skip to content

Commit

Permalink
[fix] minor cosmetics for .browserslistrc handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jchip committed Jan 22, 2021
1 parent c9c5099 commit 73e0cec
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
5 changes: 4 additions & 1 deletion packages/xarc-app-dev/src/config/babel/babelrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ const target = isNodeTarget ? "node" : babelTarget;

const targets = envTargets[target];
if (!isJest) {
console.log(ck`<orange>Babel preset-env compile targets: </><cyan>${JSON.stringify(targets)}</>`);
const srcMsg = _.isEmpty(targets) ? " (will read from '.browserslistrc')" : "";
console.log(
ck`<orange>Babel preset-env compile targets: </><cyan>${JSON.stringify(targets)}</>${srcMsg}`
);
}

const useBuiltIns =
Expand Down
8 changes: 4 additions & 4 deletions packages/xarc-app-dev/src/lib/dev-tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,10 @@ export function loadXarcDevTasks(xrun, userOptions: XarcOptions = {}) {
Fs.writeFileSync(
destRcFile,
`# Browsers that we support
last 2 versions
ie >= 11
> 5%
`
last 2 versions
ie >= 11
> 5%
`
);
logger.info(`Generating ${configRcFile} for you - please commit it.`);
}
Expand Down
6 changes: 3 additions & 3 deletions samples/subapp2-poc/.browserslistrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Browsers that we support
last 2 versions
ie >= 11
> 5%
last 2 versions
ie >= 11
> 5%

0 comments on commit 73e0cec

Please sign in to comment.