rc-source-loader
This package can directly read the source code of the file. Without any conversion
demo.js
{ const strToHtml = str || '' ; const template = ` <!DOCTYPE html> <html> <head> </head> <body> <div> </div> </body> </html>`; return template;}
Use
import demo from 'rrc-source-loader!./demo.js';
// Directly output the contents of this js
console.log(demo);