[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

webpack插件,支持将打包结果或者自定义js、css内联插入到html中。依赖htmlwebpackplugin

Notifications You must be signed in to change notification settings

huaziHear/inline-code-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

inline-code-webpack-plugin

webpack插件,支持将打包结果或者自定义js、css内联插入到html中。

entry: {
		bundle: [''],
		inlinejs: [''],
		skeleton: ['']
},
plugins: [
    new htmlWebpackPlugin({
        template: './index.html',
        chunks: ['bundle'],
        inject: false,
        minify: false
    }),
    new InlineCodeWebpackPlugin({
        // 插入打包后的代码
        headTags: ['skeleton'], 
        bodyTags: ['inlinejs', {
            tagName: 'script',
            innerHTML: 'var a= 1;', // 注入自定义脚本
            attributes: {
                href: '',
                src: ''
            }
        }]
    }),
]

About

webpack插件,支持将打包结果或者自定义js、css内联插入到html中。依赖htmlwebpackplugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published