55"use strict" ;
66
77const ConcatSource = require ( "webpack-sources" ) . ConcatSource ;
8+ const Template = require ( "./Template" ) ;
89
910class FunctionModuleTemplatePlugin {
1011 apply ( moduleTemplate ) {
@@ -29,17 +30,17 @@ class FunctionModuleTemplatePlugin {
2930 source . add ( " !*** " + req . replace ( / \* \/ / g, "*_/" ) + " ***!\n" ) ;
3031 source . add ( " \\****" + req . replace ( / ./ g, "*" ) + "****/\n" ) ;
3132 if ( Array . isArray ( module . providedExports ) )
32- source . add ( "/*! exports provided: " + module . providedExports . join ( ", " ) + " */ \n" ) ;
33+ source . add ( Template . toComment ( " exports provided: " + module . providedExports . join ( ", " ) ) + "\n" ) ;
3334 else if ( module . providedExports )
34- source . add ( "/*! no static exports found */ \n") ;
35+ source . add ( Template . toComment ( " no static exports found" ) + " \n") ;
3536 if ( Array . isArray ( module . usedExports ) )
36- source . add ( "/*! exports used: " + module . usedExports . join ( ", " ) + " */ \n" ) ;
37+ source . add ( Template . toComment ( " exports used: " + module . usedExports . join ( ", " ) ) + "\n" ) ;
3738 else if ( module . usedExports )
38- source . add ( "/*! all exports used */ \n") ;
39+ source . add ( Template . toComment ( " all exports used" ) + " \n") ;
3940 if ( module . optimizationBailout ) {
4041 module . optimizationBailout . forEach ( text => {
4142 if ( typeof text === "function" ) text = text ( this . requestShortener ) ;
42- source . add ( `/*! ${ text } */\n` ) ;
43+ source . add ( Template . toComment ( ` ${ text } ` ) + "\n" ) ;
4344 } ) ;
4445 }
4546 source . add ( moduleSource ) ;
0 commit comments