Skip to content

Commit 70baf6e

Browse files
committed
update index.ts
1 parent 5b09e97 commit 70baf6e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import path from 'path'
88
import fs from 'fs'
99
import { pathToFileURL } from "url"
1010

11-
import { version } from '../package.json' with { type: "json" }
11+
import { version as packageVersion, name as packageName } from '../package.json' with { type: "json" }
1212

1313
import type { RollupOptions } from "@bddjr/types-rollupoptions-4.43.0"
1414
import { template } from './getTemplate.js'
@@ -22,7 +22,7 @@ export function singleFileCompression(opt?: Options): PluginOption {
2222
let conf: ResolvedConfig
2323
const innerOptions = getInnerOptions(opt)
2424
return {
25-
name: "vite-plugin-singlefile-compression",
25+
name: packageName,
2626
enforce: "post",
2727
config(...args) {
2828
return setConfig.call(this, innerOptions, ...args)
@@ -76,7 +76,7 @@ function setConfig(this: ConfigPluginContext, opt: InnerOptions, config: UserCon
7676
async function generateBundle(this: PluginContext, bundle: OutputBundle, config: ResolvedConfig, options: InnerOptions) {
7777
console.log(
7878
pc.reset('\n\n') +
79-
pc.cyan('vite-plugin-singlefile-compression ' + version) +
79+
pc.cyan(packageName + ' ' + packageVersion) +
8080
' ' +
8181
(options.enableCompress
8282
? pc.green(options.compressFormat + ' ' + (

0 commit comments

Comments
 (0)