diff --git a/webpack.z-uno-compiler.js b/webpack.z-uno-compiler.js index ac68b2e..8ee6c0f 100644 --- a/webpack.z-uno-compiler.js +++ b/webpack.z-uno-compiler.js @@ -1,5 +1,22 @@ +const HtmlWebpackPlugin = require('html-webpack-plugin') const common = require("./webpack.common.js") +const template_html = '' + module.exports = function(env, argv) { - return (common.common(env, argv, './src/z-uno-compiler.ts', 'z-uno-compiler.js', 'ZUnoCompiler')); + let template_html_replace; + + if (common.beta == true) + template_html_replace = "-beta"; + else + template_html_replace = ""; + const config = common.common(env, argv, './src/z-uno-compiler.ts', 'z-uno-compiler.js', 'ZUnoCompiler'); + config.plugins.push( + new HtmlWebpackPlugin({ + inject: false, + templateContent:template_html.replace(new RegExp("{{beta}}", 'g'), template_html_replace).replace(new RegExp("{{version}}", 'g'), common.web_tools_version), + filename: 'z-uno-compiler.script', + }), + ); + return (config); }; \ No newline at end of file