File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,8 @@ module.exports = function(content) {
66
66
content . reverse ( ) ;
67
67
content = content . join ( "" ) ;
68
68
69
- if ( config . interpolate ) {
69
+ if ( config . interpolate === 'require' ) {
70
+
70
71
var reg = / \$ \{ r e q u i r e \( [ ^ ) ] * \) \} / g;
71
72
var result ;
72
73
var reqList = [ ] ;
@@ -118,7 +119,11 @@ module.exports = function(content) {
118
119
content = htmlMinifier . minify ( content , minimizeOptions ) ;
119
120
}
120
121
121
- content = JSON . stringify ( content ) ;
122
+ if ( config . interpolate && config . interpolate !== 'require' ) {
123
+ content = compile ( '`' + content + '`' ) . code ;
124
+ } else {
125
+ content = JSON . stringify ( content ) ;
126
+ }
122
127
123
128
return "module.exports = " + content . replace ( / x x x H T M L L I N K x x x [ 0 - 9 \. ] + x x x / g, function ( match ) {
124
129
if ( ! data [ match ] ) return match ;
You can’t perform that action at this time.
0 commit comments