Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

html-static-before-plugin

Package Overview
Dependencies
3
Maintainers
1
Versions
12
Issues
File Explorer

Advanced tools

html-static-before-plugin

---

    1.0.11latest

Version published
Maintainers
1
Yearly downloads
8,637
increased by41.04%

Weekly downloads

Readme

Source

html-static-before-plugin


Used

在html模板中添加额外的 *.js or *.css 文件,

初始化 redux store state

关键字 <!--<html-static-before-plugin>--> 被替换的位置

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!--<html-static-before-plugin>--> </head> <body> <div id="app"></div> </body> </html> new HtmlStaticBeforePlugin(options),

options

{ assets: [ 'http://172.16.66.181:7998/react/v1/??react.production.min.js,react-dom.production.min.js,react-router-dom.min.js', ], initialState: { webSocket: 'ws://172.16.66.181' } }

构建结果

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <script src="http://172.16.66.181:7998/react/v1/??react.production.min.js,react-dom.production.min.js,react-router-dom.min.js"></script> </head> <body> <div id="app"></div> </body> </html>
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc