Commit Graph

115 Commits

Author SHA1 Message Date
btea fe2ab1bbac
chore: remove unused variable (#11842) 2024-09-07 18:30:58 +08:00
Evan You ac9e7e8bfa
test: adjust coverage config, use v8 coverage 2024-08-29 10:41:29 +08:00
Kevin Deng 三咲智子 928af5fe2f
refactor(types): enable `isolatedDeclarations` (#11178) 2024-08-08 23:05:21 +08:00
Evan You f15ba2c2e2
chore: Merge branch 'main' into minor 2024-07-17 17:32:31 +08:00
Evan You aef807746a
refactor(compiler): move patchFlag text generation to codegen phase 2024-07-13 19:40:04 +08:00
Evan You cd0ea0d479
fix(compiler-core): change node hoisting to caching per instance (#11067)
close #5256
close #9219
close #10959
2024-06-04 20:09:54 +08:00
Evan You f12c81efca
fix(compiler-ssr): fix hydration mismatch for conditional slot in transition
close #10743
2024-04-22 22:23:09 +08:00
zhangenming 9c54dacd0d
chore: use NOOP. (#9938) 2024-01-09 15:24:10 +08:00
三咲智子 Kevin Deng bfe6b459d3
style: update format & lint config (#9162)
Co-authored-by: 丶远方 <yangpanteng@gmail.com>
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
Co-authored-by: Guo Xingjun <99574369+Plumbiu@users.noreply.github.com>
2023-12-26 19:39:47 +08:00
Evan You 2ffc1e8cfd
feat(ssr): improve ssr hydration mismatch checks (#5953)
- Include the actual element in the warning message
- Also warn class/style/attribute mismatches

Note: class/style/attribute mismatches are check-only and will not be
rectified.

close #5063
2023-12-08 15:49:09 +08:00
Adrien Foulon 638f1abbb6
feat(compiler-core): add current filename to TransformContext (#8950) 2023-12-08 15:23:50 +08:00
Evan You fb619cf9a4 fix(compiler-sfc): fix ast reuse for ssr 2023-11-27 15:38:30 +08:00
renovate[bot] 16a6438236
chore(deps): update lint (#9627)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-11-18 10:33:24 +08:00
Evan You 733437691f fix(hmr): fix hmr error for hoisted children array in v-for
fix #6978
close #7114
2023-10-21 21:08:49 +08:00
丶远方 712f96d6ac
perf: replace Map/Set with WeakMap/WeakSet (#8549) 2023-10-20 17:11:52 +08:00
Evan You aac163110f refactor: remove circular dependencies in compiler 2023-03-23 16:30:42 +08:00
三咲智子 Kevin Deng 9060bf0353
refactor(compiler-core): make ast.helpers a Set (#6774) 2022-11-13 20:44:02 -05:00
Evan You 516bc548fc fix(compiler-ssr): fix wrong attrs fallthrough on non-single-root v-if branches
fix #5140
2022-05-19 11:21:17 +08:00
Evan You 47f488350c chore: run updated prettier 2021-07-19 18:24:18 -04:00
fishDog eca4d7891a chore(compiler-core): reduce unnecessary cache inside v-once (#4112) 2021-07-16 14:30:49 -04:00
Evan You 3b64508e3b feat: v-memo 2021-07-16 14:30:49 -04:00
Evan You b7ea7c1485 perf: also hoist all-static children array 2021-07-16 14:30:49 -04:00
Evan You 02339b67d8 perf: hoist dynamic props lists 2021-07-16 14:30:49 -04:00
HcySunYang ceff89905b perf: improve VNode creation performance with compiler hints (#3334) 2021-07-16 14:30:49 -04:00
Evan You 7dc681c196 wip: filters compat 2021-04-19 12:29:55 -04:00
Evan You e130c7db23 wip: compiler deprecation config 2021-04-12 19:43:53 -04:00
HcySunYang 7715c49af9
fix(compiler-core): avoid generating useless createVNode helper (#2938)
close #2739
2021-03-25 17:01:50 -04:00
Evan You 02cbbb718c perf: support only attaching slot scope ids when necessary
This is done by adding the `slotted: false` option to:

- compiler-dom
- compiler-ssr
- compiler-sfc (forwarded to template compiler)

At runtime, only slotted component will render slot fragments with
slot scope Ids. For SSR, only slotted component will add slot scope Ids
to rendered slot content. This should improve both runtime performance
and reduce SSR rendered markup size.

Note: requires SFC tooling (e.g. `vue-loader` and `vite`) to pass on
the `slotted` option from the SFC descriptoer to the `compileTemplate`
call.
2021-03-05 18:28:12 -05:00
Evan You c69f4ea857 fix(compiler-ssr): avoid duplicated asset imports merged from component slot client branch
fix vitejs/vite#2034
2021-02-15 12:12:50 -05:00
Evan You a8352506f6 refactor: cache constant check result on transform context
also fix edge case for missed createVNode import on static svg nodes
2020-12-03 11:10:40 -05:00
Evan You 67d1aac6ae feat(sfc): allow sfcs to recursively self-reference in template via name inferred from filename
e.g. A file named `FooBar.vue` can refer to itself as `<FooBar/>`. This gets rid of the need for the `name` option.
2020-11-30 12:30:51 -05:00
Evan You 3bc2914e32 fix(attr-fallthrough): ensure consistent attr fallthrough for root fragments with comments
fix #2549
2020-11-27 18:04:26 -05:00
Evan You 90bdf59f4c refactor(compiler): better constant hoist/stringify checks 2020-11-20 19:26:07 -05:00
Evan You c15bd6235e wip: generate valid v-model and TS code in script setup inline mode 2020-11-17 12:42:58 -05:00
Evan You 2a4fc32d15 wip: remove unnecessary inlinePropsIdentifier option 2020-11-11 10:36:59 -05:00
Evan You 886ed7681d feat(compiler-sfc): compileScript inline render function mode 2020-11-10 16:28:34 -05:00
Evan You 3f99e239e0 feat(compiler-sfc): support kebab-case components in `<script setup>` sfc template 2020-11-09 17:22:58 -05:00
edison b29bc0d694
chore(compiler-core): define `child` if necessary. (#2033) 2020-09-14 20:56:53 -04:00
Evan You 52e45a9850 fix(v-once): fix v-once usage with v-if and v-for
fix #2035
2020-09-02 12:30:37 -04:00
Evan You 71c3c6e2a0 fix(v-model): allow v-model usage on declared custom elements
fix #1699
2020-07-27 17:09:30 -04:00
Evan You b9595e64cf feat: ssr support for `<style vars>` 2020-07-12 18:04:09 -04:00
Evan You b6cdd5621e wip: template binding optimization 2020-07-10 22:12:25 -04:00
Evan You baa6973b13 wip(compiler): tests for new stringification 2020-05-15 15:50:42 -04:00
Evan You cb9444807e wip(compiler): improve node stringification to support adjacent nodes 2020-05-15 12:58:44 -04:00
Evan You 8449a9727c feat(compiler-core): switch to @babel/parser for expression parsing
This enables default support for parsing bigInt, optional chaining
    and nullish coalescing, and also adds the `expressionPlugins`
    compiler option for enabling additional parsing plugins listed at
    https://babeljs.io/docs/en/next/babel-parser#plugins.
2020-02-27 16:53:51 -05:00
likui 7b987d9450
fix(compiler-core): should alias name in helperString (#743)
fix #740
2020-02-19 09:49:46 -05:00
Evan You e0f3c6b352 fix(compiler-core): should apply text transform to if branches
fix #725
2020-02-14 15:57:14 -05:00
Evan You 27913e661a feat(compiler-dom/runtime-dom): stringify eligible static trees 2020-02-12 11:56:42 -05:00
Evan You e3988b40d8 refactor(compiler-core): use dedicated node type for element codegen
Previously codegen node for elements and components used raw expressions,
which leads to multiple permutations of AST shapes based on whether the
node is a block or has directives. The complexity is spread across the
entire compiler and occurs whenever a transform needs to deal with
element codegen nodes.

This refactor centralizes the handling of all possible permutations
into the codegen phase, so that all elements/components will have a
consistent node type throughout the transform phase.

The refactor is split into two commits (with test updates in a separate
one) so changes can be easier to inspect.
2020-02-11 18:40:42 -05:00
Evan You a51e710396 wip(ssr): proper scope analysis for ssr vnode slot fallback 2020-02-07 13:56:18 -05:00