flying-assets-webpack-plugin
Advanced tools
Comparing version 0.1.0-rc4 to 0.1.0-rc5
{ | ||
"name": "flying-assets-webpack-plugin", | ||
"version": "0.1.0-rc4", | ||
"version": "0.1.0-rc5", | ||
"description": "A Webpack plugin generates launching HTML for both development and production", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -132,3 +132,3 @@ Flying Assets Webpack Plugin | ||
app.get('*', (req, res, error) => { | ||
res.render('index'); // now you have locals `assets` in your template scope | ||
res.render('index'); | ||
}); | ||
@@ -141,4 +141,5 @@ ``` | ||
app.locals.assets = require('../dist/assets.json'); | ||
app.locals.publicPath = require('../webpack.prod').output.publicPath; | ||
app.get('*', (req, res, error) => { | ||
res.render('index'); // now you have locals `assets` in your template scope | ||
res.render('index'); | ||
}); | ||
@@ -145,0 +146,0 @@ ``` |
@@ -9,2 +9,4 @@ export default function webpackAssetsMiddleware(compiler, options = {}) { | ||
res.locals.assets = compiler.assets; | ||
res.locals.publicPath = compiler.options.output.publicPath, | ||
if (options.render) { | ||
@@ -11,0 +13,0 @@ res.send(compiler.html); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12123
182
157