Closed leosin closed 2 years ago
Thank you very much, I will read it carefully
but this doesn't actually resolve the issue. This is a library that could be used in .js configurations which cannot be configured to run like a module or be precompiled. I work with thousands of npm libraries, this is the only one which stubbornly misunderstands the current ecosystem.
Can this be used with eleventy?
Just use this package https://github.com/simov/slugify instead of this, same API. it's not worth all the hassle with ESM modules for a single package
Error [ERR_REQUIRE_ESM]: require() of ES Module
import Slugify from '@sindresorhus/slugify'
node_modules/@sindresorhus/slugify/index.js from .../vite.config.ts not supported.
Am I doing something wrong?
https://github.com/jeremys/uslug
i use this plugin is ok
slugify: (s: string) => uslug(s),