Skip to content

How to get html without "export default" string? #168

@xuxicheta

Description

@xuxicheta

Webpack version:
3.6

HTML-Loader version:
0.5.5

Please tell us about your environment:
Windows 10

Current behavior:
i do this

{
        test: /\.(html)$/,
        include: [path.resolve(__dirname, 'src', 'html')],
        use: [
          {
            loader: 'html-loader',
            options: {
              exportAsEs6Default: 'es6',
              minimize: true,
              collapseWhitespace: true,
            }
          },
        ],
      },
}

then

import Table from './html/table.html';

and have

export default "<table> <tr> <td>1</td> <td>2</td> </tr> </table>";"

in the my Table variable.

Expected/desired behavior:
I cant use it. How i get pure html string without export default="";

  • Browser: all

  • Language: ES6/7]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions