Skip to content

Commit

Permalink
Update versionBabelPlugin.js
Browse files Browse the repository at this point in the history
  • Loading branch information
dompuiu authored Aug 21, 2024
1 parent c0d6b23 commit da3f240
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/helpers/versionBabelPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export default (_ref) => {
// __VERSION__
ReferencedIdentifier(path, state) {
const identifier = state.opts.identifier;
const transform = identifier === undefined ? true : identifier; // 默认转换
const transform = identifier === undefined ? true : identifier;

const define = state.opts.define || "__VERSION__"; // 默认值
const define = state.opts.define || "__VERSION__";
if (transform && path.node.name === define) {
path.replaceWith(t.valueToNode(getVersion(state)));
}
Expand Down

0 comments on commit da3f240

Please sign in to comment.