0.2.2 • Published 5 years ago

html-webpack-blade-plugin v0.2.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Blade extension for HTML Webpack Plugin

This plugin mutates the HTML file after it's been generated. Useful in situations like using vue-cli.

Installation

npm install --save-dev html-webpack-blade-plugin

Usage

plugins: [
  new HtmlWebpackBladePlugin()
]

By default <html> will be replaced with @extends('html'), <head> with @section('scripts') and <body> with @section('content'). These defaults can be overridden:

plugins: [
  new HtmlWebpackBladePlugin({
    extends: 'my.layout.template',
    scripts: 'myScriptYield',
    content: 'myContentYield',
  })
]

Production & Minification

The mutation will only be performed in production environments. You can still serve an HTML file as you normally would in development.

Since Blade is server-side template code (and will be processed by the Blade compiler), HTML minification should be disabled. There's no benifit to minifying a template, and it may break Blade.

License

This package is licensed under the MIT license. Do as you wish.

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.1

6 years ago