An open API service indexing awesome lists of open source software.

https://github.com/vanng822/webpackstats

Generate url based on bundle tracker stats
https://github.com/vanng822/webpackstats

Last synced: over 1 year ago
JSON representation

Generate url based on bundle tracker stats

Awesome Lists containing this project

README

          

# webpackstats
For rendering the bundle url generated by webpack based on metadata generated by https://github.com/owais/webpack-bundle-tracker

# Usage

```go
templates := template.New("")
templates = templates.Funcs(webpackstats.WebpackURLFuncMap("/path/to/stats.json"))
templates = template.Must(templates.ParseGlob("templates/*"))
```

Bundle with single chunk
```html

```

Loop through chunks of the bundle
```html
{{- range $bundleUrl := webpackUrls "bundle" }}

{{- end }}
```

Generate scripts for all chunks of the bundle
```html
{{webpackScripts "bundle"}}
```