Open ranwawa opened 5 years ago
<div>123123</div>
plugins: [ new HtmlWebpackPlugin({ inject: false, template: HtmlWebpackTemplate, appMountId: 'ranwawa', appMountSnippet: require('./src/common.html'), // => Unexpected token < bodyHtmlSnippet: '<div>21123</div>',
plugins: [ new HtmlWebpackPlugin({ inject: false, template: HtmlWebpackTemplate, appMountId: 'ranwawa', appMountSnippet: require('html-loader!./src/common.html'), // => Cannot find module 'html-loader!./src/common.html' bodyHtmlSnippet: '<div>21123</div>',
This doesn't seem to be a problem with this library. You can't rely on Webpack loaders within your Webpack config like this. Try using fs.readFileSync.
fs.readFileSync
common.html
code