swc-loader icon indicating copy to clipboard operation
swc-loader copied to clipboard

[Bug] Unable to pass custom options via swc-loader

Open cheuksing opened this issue 2 years ago • 2 comments

Issue

Unable to pass custom options via swc-loader. (see below).

Config

{
  loader: require.resolve("swc-loader"),
  options: {
    jsc: {
      baseUrl: "src",
      paths: {
        "@services/*": ["services/*"],
        "@i18n": ["i18n"],
      },
    },
  },
}

Expected result

  • Able to pass baseUrl via swc-loader

Actual result

  • Unable to override baseUrl with webpack's swc-loader

Repository for reproducing issue

https://github.com/cheuksing/swc-loader-issue-demo

How to start Reproducing Repo

  • install deps via yarn install
  • See the repo's README.md

cheuksing avatar Dec 14 '22 10:12 cheuksing

Is there currently any work around for this?

jonniedarko avatar Mar 14 '23 03:03 jonniedarko

@jonniedarko You can remove .swcrc

kdy1 avatar Mar 14 '23 03:03 kdy1