swc-project / swc-loader

Moved to https://github.com/swc-project/pkgs
MIT License
394 stars 29 forks source link

Implement caching #2

Closed fabiosantoscode closed 3 years ago

fabiosantoscode commented 5 years ago

Let's cache these files! A fast compiler is not useful if there's no caching.

fabiosantoscode commented 5 years ago

Does anyone want to work on this?

kdy1 commented 5 years ago

I think caching may make swc-loader slower.

fabiosantoscode commented 5 years ago

We can benchmark it before we merge. I think it will be faster, but let's see!

marchaos commented 3 years ago

You can already do this with webpack

{
      test: /\.(js|jsx|ts|tsx)$/,
      exclude: /node_modules/,
      use: [
          'cache-loader',
          {
              loader: 'swc-loader',
              options: { ... }
          }
      ]
  },

as @kdy1 says - not sure it's going to be any faster though.

fabiosantoscode commented 3 years ago

Probably not needed then. Closing!