File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,12 @@ const extract = (src, __webpack_public_path__) => {
2929} ;
3030
3131const defaultMinimizeConf = {
32+ caseSensitive : true ,
3233 html5 : true ,
3334 removeComments : true ,
3435 removeCommentsFromCDATA : true ,
3536 removeCDATASectionsFromCDATA : true ,
3637 collapseWhitespace : true ,
37- collapseBooleanAttributes : true ,
3838 removeRedundantAttributes : true ,
3939 removeEmptyAttributes : true ,
4040 keepClosingSlash : true ,
Original file line number Diff line number Diff line change @@ -114,4 +114,26 @@ describe('wxml-loader', () => {
114114 const result = readFile ( ) ;
115115 expect ( result ) . toBe ( '<span><div></div></span>' ) ;
116116 } ) ;
117+
118+ test ( 'should minimize work with camelCase attribute' , async ( ) => {
119+ const code = '<div nickName="name"></div>' ;
120+ await compile ( code , { minimize : true } ) ;
121+ const result = readFile ( ) ;
122+ expect ( result ) . toBe ( '<div nickName="name"></div>' ) ;
123+ } ) ;
124+
125+ test ( 'should minimize work with form attribute' , async ( ) => {
126+ const code = '<form bindsubmit="submitForm" report-submit="true">' ;
127+ await compile ( code , { minimize : true } ) ;
128+ const result = readFile ( ) ;
129+ expect ( result ) . toBe ( '<form bindsubmit="submitForm" report-submit="true"></form>' ) ;
130+ } ) ;
131+
132+ test ( 'should minimize work with controls attribute' , async ( ) => {
133+ const code = '<map id="map" controls="{{controls}}"></map>' ;
134+ await compile ( code , { minimize : true } ) ;
135+ const result = readFile ( ) ;
136+ expect ( result ) . toBe ( '<map id="map" controls="{{controls}}"></map>' ) ;
137+ } ) ;
138+
117139} ) ;
You can’t perform that action at this time.
0 commit comments