Evan You
bd0f7da2c6
build: add browser builds for @vue/compiler-sfc
2020-04-26 01:24:25 -04:00
Evan You
eee5095692
refactor: rename <portal>
to <teleport>
...
BREAKING CHANGE: `<portal>` has been renamed to `<teleport>`.
`target` prop is also renmaed to `to`, so the new usage will be:
```html
<Teleport to="#modal-layer" :disabled="isMobile">
<div class="modal">
hello
</div>
</Teleport>
```
The primary reason for the renaming is to avoid potential naming
conflict with [native portals](https://wicg.github.io/portals/ ).
2020-04-01 21:55:19 -04:00
Evan You
9ed9bf3687
feat(portal): SSR support for portal disabled prop
2020-03-30 11:24:29 -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
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
ee5ed73361
wip(ssr): basic components
2020-02-05 23:07:23 -05:00
Evan You
1f2de9e232
fix(v-model): should use dynamic directive on input with dynamic v-bind
2020-02-05 15:21:47 -05:00
Evan You
63e4486645
wip(compiler-ssr): text and interpolation
2020-02-02 22:28:54 -05:00
Ruijia Tang
aca2c2a81e
fix(compiler-core): avoid override user keys when injecting branch key ( #630 )
2020-01-20 10:15:53 -05:00
djy0
ad2a0bde98
perf(compiler-core): simplify advancePositionWithMutation
( #564 )
2019-12-30 11:25:06 -05:00
Evan You
9550302df4
build: esm-bunlder builds should be considered browser builds
2019-12-17 17:34:10 -05:00
Evan You
0e3e07079a
feat(transition): properly handle transition & transition-group in compiler
2019-11-29 12:42:04 -05:00
Evan You
353b06df77
perf(compiler): should only perform assertions during tests
...
Compiler assertions are made to ensure implementation correctness,
but they have performance costs that should not affect users
during development.
2019-11-15 17:29:08 -05:00
Evan You
5eee1152ca
types: (wip) improve dts output
2019-11-01 11:32:53 -04:00
Evan You
516501e20e
chore: remove unused util function
2019-10-24 15:39:31 -04:00
Evan You
052febc127
feat(compiler): convert text mixed with elements into createVNode calls
...
This ensures they are tracked as dynamic children when inside blocks.
Also guaruntees compiled vnodes always have vnode children in arrays
so that they can skip normalizeVNode safely in optimized mode.
2019-10-21 15:52:29 -04:00
Evan You
58593c4714
feat(v-on): cache handlers
2019-10-18 21:51:34 -04:00
Evan You
6a75c3463b
feat(compiler-core): do not generate TEXT flag if child is constant
2019-10-16 12:00:55 -04:00
Sangeeth Sudheer
96681942c1
types: remove unnecessary types ( #234 )
2019-10-12 19:33:48 -04:00
月迷津渡
f71d252ffe
fix(compiler-core): assest id ( #190 )
...
* fix(compile-core): asset id
* test(compile-core): asset id
2019-10-10 13:55:26 -04:00
Evan You
f11dadc1d2
refactor(compiler): improve member expression check for v-on & v-model
2019-10-10 11:15:24 -04:00
Rahul Kadyan
87c3d2edae
feat(compiler-core): create transform for v-model ( #146 )
2019-10-10 10:33:58 -04:00
Evan You
93c6aa4c90
feat: v-once
...
Note: only compiler transform is tested - integration with runtime
still needs to be tested.
2019-10-09 17:32:58 -04:00
Evan You
16da9ae89f
fix(compiler): handle block nodes with custom directives + improve ast types
2019-10-08 10:50:10 -04:00
Evan You
82bd9eb1db
refactor(compiler): refine codegen node types
2019-10-05 22:48:13 -04:00
Evan You
bfecf2cdce
refactor(compiler): use symbols for runtime helpers
2019-10-05 22:48:13 -04:00
Evan You
0873254c6c
workflow: improve template explorer
2019-10-04 17:43:20 -04:00
Evan You
5047bc8dbe
workflow: basic template explorer
2019-10-04 13:08:17 -04:00
Evan You
095f5edf8d
feat(compiler): hoist static trees
2019-10-03 23:30:25 -04:00
Evan You
aa9245d55c
feat(compiler): render <slot/> as block fragments
2019-10-03 12:03:14 -04:00
Evan You
fc47029ed3
feat(compiler): support v-for on named slots
2019-10-02 23:10:41 -04:00
Evan You
f401ac6b88
refactor: improve vSlot.ts readability
2019-10-02 18:03:42 -04:00
Evan You
3d14265102
feat(compiler): handle conditional v-slot
2019-10-02 17:18:11 -04:00
Evan You
24bd6c27e0
feat(compiler): block optimization codegen for RootNode
2019-10-02 13:11:07 -04:00
Evan You
b33f0ceff1
refactor(compiler): switch to acorn
2019-10-02 11:05:56 -04:00
Evan You
a477594d65
feat(compiler): v-for codegen w/ correct blocks optimization + key flags
2019-10-01 23:19:48 -04:00
Evan You
7ee07447c5
wip: drop class opt for now + move lazy requires to utils
2019-09-30 14:52:10 -04:00
Evan You
6c8f226a79
fix: fix source map by fixing advancePositionWithMutation
2019-09-25 19:17:45 -04:00
Evan You
84909648e7
test: tests for v-on transform
2019-09-24 22:39:20 -04:00
Evan You
cae03f616d
test: improve coverage
2019-09-24 16:35:01 -04:00
Evan You
3a177a18d2
feat(compiler): element codegen
2019-09-22 16:50:57 -04:00
Evan You
9b1a548c6b
feat(compiler): basic codegen with source map support
2019-09-19 23:05:51 -04:00
Evan You
98571ab496
perf(compiler): further improve advanceBy perf
2019-09-19 21:18:18 -04:00
Evan You
81fd694dd7
perf: avoid cloning in parser advanceBy
2019-09-19 13:59:24 -04:00
Rahul Kadyan
10c1a2b332
feat(compiler-core): add parser transform for v-for directive ( #65 )
...
* feat(compiler-core): add parser transform for v-for directive
* fix: Include source location for expressions
* chore: remove comment
* refactor(compiler-core): extract hepler functions to utils
2019-09-19 13:23:49 -04:00