Skip to content

snippet work with require #82

@ranwawa

Description

@ranwawa

common.html

<div>123123</div>

code

  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>',

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions