File tree Expand file tree Collapse file tree 4 files changed +11
-17
lines changed Expand file tree Collapse file tree 4 files changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ const builds = {
25
25
entry : path . resolve ( __dirname , '../src/entries/web-runtime.js' ) ,
26
26
dest : path . resolve ( __dirname , '../dist/vue.runtime.js' ) ,
27
27
format : 'umd' ,
28
+ env : 'development' ,
28
29
banner
29
30
} ,
30
31
// runtime-only production build for CDN
@@ -41,6 +42,7 @@ const builds = {
41
42
dest : path . resolve ( __dirname , '../dist/vue.js' ) ,
42
43
format : 'umd' ,
43
44
env : 'development' ,
45
+ alias : { he : './entity-decoder' } ,
44
46
banner
45
47
} ,
46
48
// Runtime+compiler standalone production build.
@@ -49,6 +51,7 @@ const builds = {
49
51
dest : path . resolve ( __dirname , '../dist/vue.min.js' ) ,
50
52
format : 'umd' ,
51
53
env : 'production' ,
54
+ alias : { he : './entity-decoder' } ,
52
55
banner
53
56
} ,
54
57
// Web compiler (CommonJS).
@@ -91,7 +94,7 @@ function genConfig (opts) {
91
94
plugins : [
92
95
flow ( ) ,
93
96
buble ( ) ,
94
- alias ( require ( './alias' ) )
97
+ alias ( Object . assign ( { } , require ( './alias' ) , opts . alias ) )
95
98
]
96
99
}
97
100
Original file line number Diff line number Diff line change 1
1
/* @flow */
2
2
3
- import { inBrowser } from 'core/util/env'
3
+ let decoder
4
4
5
- let decode
6
-
7
- /* istanbul ignore else */
8
- if ( inBrowser ) {
9
- const decoder = document . createElement ( 'div' )
10
- decode = ( html : string ) : string => {
11
- decoder . innerHTML = html
12
- return decoder . textContent
13
- }
14
- } else {
15
- decode = require ( 'he' ) . decode
5
+ export function decode ( html : string ) : string {
6
+ decoder = decoder || document . createElement ( 'div' )
7
+ decoder . innerHTML = html
8
+ return decoder . textContent
16
9
}
17
-
18
- export { decode }
Original file line number Diff line number Diff line change 1
1
/* @flow */
2
2
3
- import { decode } from './entity-decoder '
3
+ import { decode } from 'he '
4
4
import { parseHTML } from './html-parser'
5
5
import { parseText } from './text-parser'
6
6
import { cached , no , camelize } from 'shared/util'
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Vue.config.mustUseProp = mustUseProp
16
16
Vue . options . directives = platformDirectives
17
17
18
18
// install platform patch function
19
- Vue . prototype . __patch__ = config . _isServer ? noop : patch
19
+ Vue . prototype . __patch__ = patch
20
20
21
21
// wrap mount
22
22
Vue . prototype . $mount = function (
You can’t perform that action at this time.
0 commit comments