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 = {
2525 entry : path . resolve ( __dirname , '../src/entries/web-runtime.js' ) ,
2626 dest : path . resolve ( __dirname , '../dist/vue.runtime.js' ) ,
2727 format : 'umd' ,
28+ env : 'development' ,
2829 banner
2930 } ,
3031 // runtime-only production build for CDN
@@ -41,6 +42,7 @@ const builds = {
4142 dest : path . resolve ( __dirname , '../dist/vue.js' ) ,
4243 format : 'umd' ,
4344 env : 'development' ,
45+ alias : { he : './entity-decoder' } ,
4446 banner
4547 } ,
4648 // Runtime+compiler standalone production build.
@@ -49,6 +51,7 @@ const builds = {
4951 dest : path . resolve ( __dirname , '../dist/vue.min.js' ) ,
5052 format : 'umd' ,
5153 env : 'production' ,
54+ alias : { he : './entity-decoder' } ,
5255 banner
5356 } ,
5457 // Web compiler (CommonJS).
@@ -91,7 +94,7 @@ function genConfig (opts) {
9194 plugins : [
9295 flow ( ) ,
9396 buble ( ) ,
94- alias ( require ( './alias' ) )
97+ alias ( Object . assign ( { } , require ( './alias' ) , opts . alias ) )
9598 ]
9699 }
97100
Original file line number Diff line number Diff line change 11/* @flow */
22
3- import { inBrowser } from 'core/util/env'
3+ let decoder
44
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
169}
17-
18- export { decode }
Original file line number Diff line number Diff line change 11/* @flow */
22
3- import { decode } from './entity-decoder '
3+ import { decode } from 'he '
44import { parseHTML } from './html-parser'
55import { parseText } from './text-parser'
66import { cached , no , camelize } from 'shared/util'
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Vue.config.mustUseProp = mustUseProp
1616Vue . options . directives = platformDirectives
1717
1818// install platform patch function
19- Vue . prototype . __patch__ = config . _isServer ? noop : patch
19+ Vue . prototype . __patch__ = patch
2020
2121// wrap mount
2222Vue . prototype . $mount = function (
You can’t perform that action at this time.
0 commit comments