mizdra / happy-css-modules

Typed, definition jumpable CSS Modules. Moreover, easy!
MIT License
233 stars 5 forks source link

Drop the support for Node.js v14 #135

Closed mizdra closed 2 years ago

mizdra commented 2 years ago

Dynamic import doesn't work with Node.js v14...?

https://github.com/mizdra/happy-css-modules/actions/runs/3103728372/jobs/5027380407

  ● tracks dependencies that have been pre-bundled by less compiler

    Error [ERR_VM_MODULE_NOT_MODULE]: Provided module is not an instance of Module

      46 |   let less: typeof import('less');
      47 |   return async (source, options) => {
    > 48 |     less = less ?? (await import('less').catch(handleImportError('less'))).default;
         |                     ^
      49 |     const result = await less.render(source, {
      50 |       filename: options.from,
      51 |       sourceMap: {},

      at Loader.transformer (src/transformer/less-transformer.ts:48:21)
      at Loader.readCSS (src/loader/index.ts:118:20)
      at Loader.load (src/loader/index.ts:149:40)
      at Object.<anonymous> (src/transformer/less-transformer.test.ts:100:18)
mizdra commented 2 years ago

It seems difficult to avoid this problem. So we will drop support for Node.js v14...