system-invoke-html-webpack-plugin

0.1.9 • Public • Published

system-invoke-html-webpack-plugin

Inject System.import() into HtmlWebpackPlugin template.

Install

npm i -D system-invoke-html-webpack-plugin

Usage

webpack.config.js

...
plugins: [
  new HtmlWebpackPlugin(),
  new SystemHtmlWebpackPlugin()
  ...
]

html

<html>
<body>
...
<!-- systemjs lib need to be imported by your self or use 'include-assets-html-webpack-plugin' -->
<script src="/assets/js/systemjs.js"></script>
<script src="/assets/js/vendors.chunk.js"></script>
<script src="/assets/js/main.js"></script>
<!-- system-invoke-html-webpack-plugin just do this use System to import the last js -->
<script type="text/javascript">System.import("/assets/js/main.js");</script>
</body>
</html>

API

new SystemHtmlWebpackPlugin(name)   // default is the last js that append to body

License

MIT

Package Sidebar

Install

npm i system-invoke-html-webpack-plugin

Weekly Downloads

0

Version

0.1.9

License

MIT

Unpacked Size

6.34 kB

Total Files

4

Last publish

Collaborators

  • stephenliu1944