Skip to content

Commit 0d95884

Browse files
committed
chore: bump version
1 parent 26e399c commit 0d95884

File tree

7 files changed

+147
-16
lines changed

7 files changed

+147
-16
lines changed

playground/vite.config.ts

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,31 @@ export default defineConfig({
1717
port: 8451,
1818
},
1919
// publicDir: 'base/public',
20-
plugins: [vue(), imagemin({
21-
cache: false,
22-
})],
20+
plugins: [
21+
vue(),
22+
imagemin({
23+
// default true
24+
cache: false,
25+
// Default configuration options for compressing different pictures
26+
compress: {
27+
jpg: {
28+
quality: 10,
29+
},
30+
jpeg: {
31+
quality: 10,
32+
},
33+
png: {
34+
quality: 10,
35+
},
36+
webp: {
37+
quality: 10,
38+
},
39+
},
40+
conversion: [
41+
{ from: 'jpeg', to: 'webp' },
42+
{ from: 'png', to: 'webp' },
43+
{ from: 'JPG', to: 'jpeg' },
44+
],
45+
}),
46+
],
2347
});

pnpm-lock.yaml

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/esbuild.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1-
import unplugin from '.';
1+
/**
2+
* This entry file is for esbuild plugin. Requires esbuild >= 0.15
3+
*
4+
* @module
5+
*/
26

3-
export default unplugin.esbuild;
7+
import unplugin from './index'
8+
9+
/**
10+
* Esbuild plugin
11+
*
12+
* @example
13+
* ```ts
14+
* import { build } from 'esbuild'
15+
* import Vue from 'unplugin-imagemin/esbuild'
16+
*
17+
* build({ plugins: [Vue()] })
18+
```
19+
*/
20+
const esbuild = unplugin.esbuild as typeof unplugin.esbuild
21+
export default esbuild
22+
export { esbuild as 'module.exports' }

src/farm.ts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1-
import unplugin from '.';
1+
/**
2+
* This entry file is for esbuild plugin. Requires esbuild >= 0.15
3+
*
4+
* @module
5+
*/
26

3-
export default unplugin.farm;
7+
import unplugin from './index'
8+
9+
/**
10+
* Esbuild plugin
11+
*
12+
* @example
13+
* ```ts
14+
* import imagemin from 'unplugin-imagemin/farm'
15+
*
16+
* build({ plugins: [imagemin()] })
17+
```
18+
*/
19+
const farm = unplugin.farm as typeof unplugin.farm
20+
export default farm
21+
export { farm as 'module.exports' }

src/rollup.ts

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1-
import unplugin from '.';
1+
/**
2+
* This entry file is for Rollup plugin.
3+
*
4+
* @module
5+
*/
26

3-
export default unplugin.rollup;
7+
import unplugin from './index'
8+
9+
/**
10+
* Rollup plugin
11+
*
12+
* @example
13+
* ```ts
14+
* // rollup.config.js
15+
* import Starter from 'unplugin-imagemin/rollup'
16+
*
17+
* export default {
18+
* plugins: [Starter()],
19+
* }
20+
* ```
21+
*/
22+
const rollup = unplugin.rollup as typeof unplugin.rollup
23+
export default rollup
24+
export { rollup as 'module.exports' }

src/vite.ts

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1-
import unplugin from '.';
1+
/**
2+
* This entry file is for Vite plugin.
3+
*
4+
* @module
5+
*/
26

3-
export default unplugin.vite;
7+
import unplugin from './index'
8+
9+
/**
10+
* Vite plugin
11+
*
12+
* @example
13+
* ```ts
14+
* // vite.config.ts
15+
* import Starter from 'unplugin-vue/vite'
16+
*
17+
* export default defineConfig({
18+
* plugins: [Starter()],
19+
* })
20+
* ```
21+
*/
22+
const vite = unplugin.vite as typeof unplugin.vite
23+
export default vite
24+
export { vite as 'module.exports' }

src/webpack.ts

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
1-
import unplugin from '.';
2-
import type { } from 'webpack';
1+
/**
2+
* This entry file is for webpack plugin.
3+
*
4+
* @module
5+
*/
36

4-
export default unplugin.webpack;
7+
import unplugin from './index'
8+
9+
/**
10+
* Webpack plugin
11+
*
12+
* @example
13+
* ```js
14+
* // webpack.config.js
15+
* import Vue from 'unplugin-vue/webpack'
16+
*
17+
* default export {
18+
* plugins: [imagemin()],
19+
* }
20+
* ```
21+
*/
22+
const webpack = unplugin.webpack as typeof unplugin.webpack
23+
export default webpack
24+
export { webpack as 'module.exports' }

0 commit comments

Comments
 (0)