1.0.3 • Published 2 years ago

html-webpack-plugin-inject-thyme-leaf-tags v1.0.3

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

ThymeLeaf Tag Injector

A html webpack plugin to inject thymeleaf compatible template tags for script and style tags

Installation

	yarn add -D html-webpack-plugin-inject-thyme-leaf-tags

or

	npm install -D html-webpack-plugin-inject-thyme-leaf-tags

Usage example

import WebpackPluginInjectThymeTags from 'html-webpack-plugin-inject-thyme-leaf-tags';

under webpack config plugin section add

plugins: [
	new HtmlWebpackPlugin({
		template: path.join(__dirname, "src", "index.html"),
	}),

	new HtmlWebpackPluginInjectTags({
		stylePrefix: "/static/",
		scriptPrefix: "/static/",
	}),
]

you can pass an empty object if no prefix is needed like this

new HtmlWebpackPluginInjectTags({})

or like this

new HtmlWebpackPluginInjectTags(),