1.1.0 • Published 5 years ago

@talend/html-webpack-plugin v1.1.0

Weekly downloads
76
License
Apache-2.0
Repository
github
Last release
5 years ago

@talend/html-webpack-plugin

This plugin is to provide some default hooks into html-webpack-plugin

options

The plugin support the following options:

namedescription
loadCSSAsyncPut all CSS in the body and use a trick to not block the rendering of the App
appLoaderIcon This activate the AppLoader from @talend/react-components
versionsThis setup the TALEND_APP_INFO global var to add some informations about the versions used
bodyBefore Array of assets to add before the scripts

example:

const TalendHTML = require('@talend/html-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ICON = "url('data:image/svg+xml;base64,PHN2...')";
const VERSIONS = {
	version: require('./package.json').version,
};

//... plugins
    new HtmlWebpackPlugin({
        // ... your options
    }),
    new TalendHTML({
        loadCSSAsync: true,
        appLoaderIcon: ICON,
        versions: VERSIONS,
        bodyBefore: [
            { tagName: 'script', closeTag: true, innerHTML: 'alert("hello");' },
        ],
    }),

LICENSE

Copyright (c) 2006-2018 Talend

Licensed under the Apache V2 License

1.1.0

5 years ago

1.0.0

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago