File tree Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ export default defineBuildConfig({
2727 hooks : {
2828 "rollup:options" : ( _ctx , opts ) => {
2929 if ( process . env . PLUGIN_CODECOV_TOKEN && Array . isArray ( opts . plugins ) ) {
30- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
3130 opts . plugins = [
3231 ...opts . plugins ,
32+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
3333 codecovRollupPlugin ( {
3434 enableBundleAnalysis :
3535 typeof process . env . PLUGIN_CODECOV_TOKEN === "string" ,
Original file line number Diff line number Diff line change 11import { defineBuildConfig } from "unbuild" ;
22import { codecovRollupPlugin } from "codecovProdRollupPlugin" ;
3+ import packageJson from "./package.json" ;
34
45export default defineBuildConfig ( {
56 entries : [ "./src/index" ] ,
@@ -17,13 +18,19 @@ export default defineBuildConfig({
1718 esbuild : {
1819 minify : true ,
1920 } ,
21+ replace : {
22+ preventAssignment : true ,
23+ values : {
24+ __PACKAGE_VERSION__ : JSON . stringify ( packageJson . version ) ,
25+ } ,
26+ } ,
2027 } ,
2128 hooks : {
2229 "rollup:options" : ( _ctx , opts ) => {
2330 if ( process . env . PLUGIN_CODECOV_TOKEN && Array . isArray ( opts . plugins ) ) {
24- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
2531 opts . plugins = [
2632 ...opts . plugins ,
33+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
2734 codecovRollupPlugin ( {
2835 enableBundleAnalysis :
2936 typeof process . env . PLUGIN_CODECOV_TOKEN === "string" ,
Original file line number Diff line number Diff line change 11import { defineBuildConfig } from "unbuild" ;
22import { codecovRollupPlugin } from "codecovProdRollupPlugin" ;
3+ import packageJson from "./package.json" ;
34
45export default defineBuildConfig ( {
56 entries : [ "./src/index" ] ,
@@ -17,6 +18,12 @@ export default defineBuildConfig({
1718 esbuild : {
1819 minify : true ,
1920 } ,
21+ replace : {
22+ preventAssignment : true ,
23+ values : {
24+ __PACKAGE_VERSION__ : JSON . stringify ( packageJson . version ) ,
25+ } ,
26+ } ,
2027 } ,
2128 hooks : {
2229 "rollup:options" : ( _ctx , opts ) => {
Original file line number Diff line number Diff line change 11import { defineBuildConfig } from "unbuild" ;
22import { codecovRollupPlugin } from "codecovProdRollupPlugin" ;
3+ import packageJson from "./package.json" ;
34
45export default defineBuildConfig ( {
56 entries : [ "./src/index" ] ,
@@ -16,6 +17,12 @@ export default defineBuildConfig({
1617 esbuild : {
1718 minify : true ,
1819 } ,
20+ replace : {
21+ preventAssignment : true ,
22+ values : {
23+ __PACKAGE_VERSION__ : JSON . stringify ( packageJson . version ) ,
24+ } ,
25+ } ,
1926 } ,
2027 hooks : {
2128 "rollup:options" : ( _ctx , opts ) => {
You can’t perform that action at this time.
0 commit comments