Skip to content

Commit

Permalink
feat: release 3.0.0-beta.3
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Jan 27, 2022
1 parent 1fa8ece commit 19e6008
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 31 deletions.
4 changes: 1 addition & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite-plugin-html",
"version": "3.0.0-beta.2",
"version": "3.0.0-beta.3",
"description": "A plugin for vite to Minimize index.html and use lodash.template template syntax in index.html",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
Expand Down Expand Up @@ -61,8 +61,6 @@
"@types/fs-extra": "^9.0.13",
"@types/html-minifier-terser": "^6.1.0",
"@types/node": "^17.0.12",
"@types/rollup": "^0.54.0",
"rollup": "^2.66.1",
"typescript": "^4.5.5",
"vite": "^2.7.13"
}
Expand Down
6 changes: 0 additions & 6 deletions packages/core/src/htmlPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,10 @@ const bodyInjectRE = /<\/body>/

export function createPlugin(userOptions: UserOptions = {}): Plugin {
const { entry, template = DEFAULT_TEMPLATE, pages = [] } = userOptions
let { preserveEntrySignatures } = userOptions

let viteConfig: ResolvedConfig
let env: Record<string, any> = {}

if (preserveEntrySignatures === true) {
preserveEntrySignatures = 'exports-only'
}

return {
name: 'vite:html',
// enforce: 'pre',
Expand All @@ -38,7 +33,6 @@ export function createPlugin(userOptions: UserOptions = {}): Plugin {
return mergeConfig(conf, {
build: {
rollupOptions: {
preserveEntrySignatures: preserveEntrySignatures ?? false,
input: createInput(userOptions, conf as unknown as ResolvedConfig),
},
},
Expand Down
8 changes: 0 additions & 8 deletions packages/core/src/typing.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Options as EJSOptions } from 'ejs'
import type { Options as MinifyOptions } from 'html-minifier-terser'
import type { PreserveEntrySignaturesOption } from 'rollup'

export type Entry = string | Record<string, string>

Expand Down Expand Up @@ -50,11 +49,4 @@ export interface UserOptions {
* @description inject options
*/
inject?: InjectOptions

/**
* Enable to preserve entry singatures.
* @see https://rollupjs.org/guide/en/#preserveentrysignatures
* @default false
*/
preserveEntrySignatures?: PreserveEntrySignaturesOption | boolean
}
14 changes: 0 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 19e6008

Please sign in to comment.