vue-shaker 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +8 -1
- package/package.json +25 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# vue-shaker
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9c8c6d6: Sharpen the package positioning. The README and npm description now lead with
|
|
8
|
+
what a JS bundler and Vue's own compiler fundamentally cannot remove —
|
|
9
|
+
runtime-interpolated class strings, template branches, and unused
|
|
10
|
+
`<style scoped>` rules (Vue prunes none) — rather than the generic "tree-shakes
|
|
11
|
+
props". No API or behavior change.
|
|
12
|
+
|
|
3
13
|
## 0.1.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -4,11 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
<h1 align="center">vue-shaker</h1>
|
|
6
6
|
|
|
7
|
-
<p align="center">
|
|
7
|
+
<p align="center"><strong>Deletes the dead code your bundler can't see</strong> — unreachable <code>v-if</code> branches and <code><style scoped></code> rules — from Vue 3 SFCs.</p>
|
|
8
8
|
|
|
9
9
|
**▶ Try it in the browser: https://baseballyama.github.io/vue-shaker/** — an
|
|
10
10
|
interactive playground that runs the engine entirely client-side.
|
|
11
11
|
|
|
12
|
+
Rollup tree-shakes JS modules, but it can't see inside a `.vue`; Vue compiles one
|
|
13
|
+
generic render function per component and prunes **no** scoped CSS at all. So the
|
|
14
|
+
`.btn-danger` rule you never use, the `v-if="loading"` arm you never trigger, and
|
|
15
|
+
the props you never pass ship in **every** app that imports the component.
|
|
16
|
+
`vue-shaker` is a **sound, whole-program tree-shaker** for Vue 3 SFCs
|
|
17
|
+
(`<script setup>` + `defineProps`) that closes that gap.
|
|
18
|
+
|
|
12
19
|
It runs in your app's production build, _before_ the Vue compiler, and slims each
|
|
13
20
|
`.vue` file by partially evaluating it against how the **whole app** actually uses
|
|
14
21
|
it: props that are never passed (or always passed the same value) are folded to
|
package/package.json
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-shaker",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Source-level tree-shaker for Vue 3 SFCs — removes unreachable v-if branches and scoped CSS rules a bundler can't see",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"dead-code-elimination",
|
|
7
|
+
"defineProps",
|
|
8
|
+
"optimization",
|
|
9
|
+
"rollup-plugin",
|
|
10
|
+
"sfc",
|
|
11
|
+
"tree-shaker",
|
|
12
|
+
"tree-shaking",
|
|
13
|
+
"vite-plugin",
|
|
14
|
+
"vue",
|
|
15
|
+
"vue3"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://github.com/baseballyama/vue-shaker#readme",
|
|
18
|
+
"bugs": "https://github.com/baseballyama/vue-shaker/issues",
|
|
5
19
|
"license": "MIT",
|
|
6
20
|
"author": "baseballyama",
|
|
7
21
|
"repository": {
|
|
@@ -9,25 +23,11 @@
|
|
|
9
23
|
"url": "git+https://github.com/baseballyama/vue-shaker.git",
|
|
10
24
|
"directory": "packages/vue-shaker"
|
|
11
25
|
},
|
|
12
|
-
"homepage": "https://github.com/baseballyama/vue-shaker#readme",
|
|
13
|
-
"bugs": "https://github.com/baseballyama/vue-shaker/issues",
|
|
14
|
-
"keywords": [
|
|
15
|
-
"vue",
|
|
16
|
-
"vue3",
|
|
17
|
-
"tree-shaking",
|
|
18
|
-
"tree-shaker",
|
|
19
|
-
"dead-code-elimination",
|
|
20
|
-
"sfc",
|
|
21
|
-
"vite-plugin",
|
|
22
|
-
"rollup-plugin",
|
|
23
|
-
"optimization",
|
|
24
|
-
"defineProps"
|
|
25
|
-
],
|
|
26
|
-
"type": "module",
|
|
27
26
|
"files": [
|
|
28
27
|
"dist",
|
|
29
28
|
"CHANGELOG.md"
|
|
30
29
|
],
|
|
30
|
+
"type": "module",
|
|
31
31
|
"main": "./dist/index.js",
|
|
32
32
|
"types": "./dist/types/index.d.ts",
|
|
33
33
|
"exports": {
|
|
@@ -46,14 +46,6 @@
|
|
|
46
46
|
},
|
|
47
47
|
"./package.json": "./package.json"
|
|
48
48
|
},
|
|
49
|
-
"scripts": {
|
|
50
|
-
"build": "rollup -c",
|
|
51
|
-
"build:wasm": "wasm-pack build engine-rs --target nodejs --release --out-dir pkg",
|
|
52
|
-
"prepack": "rollup -c",
|
|
53
|
-
"dev": "rollup -cw",
|
|
54
|
-
"test:watch": "vitest",
|
|
55
|
-
"test": "vitest run"
|
|
56
|
-
},
|
|
57
49
|
"dependencies": {
|
|
58
50
|
"@babel/parser": "^7.26.0",
|
|
59
51
|
"@vue/compiler-dom": "^3.5.13",
|
|
@@ -76,5 +68,12 @@
|
|
|
76
68
|
},
|
|
77
69
|
"peerDependencies": {
|
|
78
70
|
"vue": "^3"
|
|
71
|
+
},
|
|
72
|
+
"scripts": {
|
|
73
|
+
"build": "rollup -c",
|
|
74
|
+
"build:wasm": "wasm-pack build engine-rs --target nodejs --release --out-dir pkg",
|
|
75
|
+
"dev": "rollup -cw",
|
|
76
|
+
"test:watch": "vitest",
|
|
77
|
+
"test": "vitest run"
|
|
79
78
|
}
|
|
80
|
-
}
|
|
79
|
+
}
|