Skip to content

ESM import works, but with warnings #9

@jschirrmacher

Description

@jschirrmacher

When using esm (via vite) the following warning is printed:

▲ [WARNING] Converting "require" to "esm" is currently not supported [unsupported-require-call]

    node_modules/@maphubs/tokml/index.js:1:10:
      1 │ var esc = require('./lib/xml-escape')
        ╵           ~~~~~~~

I actually did import the package like documented in README:

import tokml from "@maphubs/tokml"

and it seem to work. However, I don't like warnings and would very much appreciate to use a really ESM compatible module.

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