1.0.11 • Published 5 years ago

html-static-before-plugin v1.0.11

Weekly downloads
257
License
ISC
Repository
-
Last release
5 years ago

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>
1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago