We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fis.match('::package', { spriter: fis.plugin('csssprites'), postpackager: fis.plugin('loader', { allInOne: { includeAsyncs: true, js: function(file) { return "static/" + file.filename + ".js"; }, css: function(file) { return "static/" + file.filename + ".css"; }, sourceMap: true //是否生成依赖map文件 }, resourcemapWhitespace: 4 }) })
test.html
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="Description" content="" /> <meta name="Keywords" content="" /> <title>数据门户</title> </head> <body> <div class="wrapper" id='main_top'> <div class="pub_box"> <div class="pub_box_t"> <h2>批量添加</h2> <div class="title_right_box"><a class="batch_add_demo" href="/ch/download/manager/pcwap_cid.xlsx">下载模版</a></div> </div> <div class="pub_box_c batch_add"> <iframe id="iframe_upload_box" width="0" height="0" style="display: none" name="iframe_upload_box" src=""> <html> <head></head> <body></body> </html> </iframe> </div> </div> </div> <script> require.async(['app.js']) </script> </body> </html>
output
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="Description" content="" /> <meta name="Keywords" content="" /> <title>数据门户</title> </head> <body> <div class="wrapper" id='main_top'> <div class="pub_box"> <div class="pub_box_t"> <h2>批量添加</h2> <div class="title_right_box"><a class="batch_add_demo" href="/ch/download/manager/pcwap_cid.xlsx">下载模版</a></div> </div> <div class="pub_box_c batch_add"> <iframe id="iframe_upload_box" width="0" height="0" style="display: none" name="iframe_upload_box" src=""> <html> <head>undefined <body> <script> require.async(['app.js']) </script> </body> </html> </iframe> </div> </div> </div> undefined </html>
为啥我的脚本跑到iframe里面去了呢?
The text was updated successfully, but these errors were encountered:
没人解决吗? 好像是跟body标签有关,我的模板碎片里没有body,产出没有js引用
Sorry, something went wrong.
没有 body 标签的自己加 placeholder 。 https://github.com/fex-team/fis3-postpackager-loader/blob/master/index.js#L117-L125
楼主的问题应该也能用这个方式解决。
No branches or pull requests
test.html
output
为啥我的脚本跑到iframe里面去了呢?
The text was updated successfully, but these errors were encountered: