Closed webdiscus closed 1 year ago
@Raxel21
yes, I can reproduce the problem and will fix it soon. Thanks!
The plugin expects an HTML output file, but not PHP. I will add support for a custom output file.
Thank you in advance for your time
@Raxel21
in the new release v1.9.0
the issue is fixed. Now a PHP template can be processed.
new HtmlBundlerPlugin({
test: /\.php$/i,
verbose: true,
filename: '[name].php', // define output filename for all templates defined in entry
entry: {
home: path.join(__dirname, 'src/public/index.php'),
},
js: {
filename: '[name].[contenthash:8].js',
},
css: {
filename: '[name].[contenthash:8].css',
},
loaderOptions: {
preprocessor: false, // disable template compilation to HTML
},
})
Please see How to process a PHP template in readme.
Thank you so much, It works so good! Thank you for taking the time to add this new functionality.
@Raxel21
is the problem solved? Can be the issue closed?
Yes, it works very well for me, thank you very much!
Discussed in https://github.com/webdiscus/html-bundler-webpack-plugin/discussions/3