Skip to content

Commit

Permalink
feat: export version (#1996)
Browse files Browse the repository at this point in the history
Co-authored-by: xuying.xu <xuying.xu@alibaba-inc.com>
  • Loading branch information
tangying1027 and xuying.xu authored Sep 14, 2024
1 parent 73c4ff6 commit 787abb2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
"adm-zip": "^0.5.10",
"babel-plugin-minify-replace": "^0.5.0",
"canvas-to-buffer": "^1.1.1",
"cross-env": "^6.0.3",
"danger": "^11.2.3",
Expand Down
10 changes: 10 additions & 0 deletions packages/f2/.fatherrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,22 @@ export default process.env.CI && process.env.CI === 'true'
// umd: { name: 'F2JSXRuntime', file: 'jsx-runtime' },
// },
},

typescriptOpts: {
tsconfigOverride: {
compilerOptions: {
target: 'es5',
},
},
},
extraBabelPlugins: [['babel-plugin-minify-replace', {
"replacements": [{
"identifierName": "VERSION",
"replacement": {
"type": "identifier",
"value": JSON.stringify(require('./package').version),
}
}]
}]],
extraRollupPlugins: [...(isBundleVis ? [visualizer()] : [])],
};
3 changes: 3 additions & 0 deletions packages/f2/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ export * from '@antv/f-engine';
export { default as Chart, ChartProps } from './chart';
export { Scale, ScaleConfig } from './deps/f2-scale/src';
export * from './components';

//@ts-ignore
export default { version: VERSION };

0 comments on commit 787abb2

Please sign in to comment.