Cannot get this loader to work to support import.meta.url

I’m trying to load https://github.com/justinfagnani/chessboard-element in a vue-cli 4 project and it’s giving me this error:

Failed to compile with 1 errors                                                                                                                              

error  in ./node_modules/chessboard-element/lib/chessboard-element.js

because of this line:

const wikipediaPiece = (p) => new URL(`../chesspieces/wikipedia/${p}.png`, import.meta.url).href;

After digging a bit, it seems to be because Webpack doesn’t support import.meta.url as described here: https://github.com/webpack/webpack/issues/6719

There is a loader that is supposed to solve the problem here: https://github.com/open-wc/open-wc/tree/master/packages/webpack-import-meta-loader

Npm: https://www.npmjs.com/package/@open-wc/webpack-import-meta-loader

I installed it and then added this to me vue.config.js

  chainWebpack(config) {
    config.module
      .rule('js')
      .test(/\.js$/)
      .use('@open-wc/webpack-import-meta-loader')
      .loader('@open-wc/webpack-import-meta-loader');
  },

Not getting any errors so the loader seems to load correctly, although it’s my first time trying to use a custom loader so I may be doing something wrong. In any case, the same error occurs and the loader seems to not be working

Help would be appreciated! Thanks!