Giter VIP home page Giter VIP logo

Comments (10)

craigmiller160 avatar craigmiller160 commented on July 17, 2024

Yep, I just opened an issue on the same thing. It seems this has been a problem for a while. I'm shocked no one has fixed it yet.

from cli.

kdy1 avatar kdy1 commented on July 17, 2024

Can you try the new native CLI?

swc-project/swc#3859

from cli.

kdy1 avatar kdy1 commented on July 17, 2024

Closing in favor of #245

from cli.

kdy1 avatar kdy1 commented on July 17, 2024

Oops I did it in the wrong way

from cli.

3axap4eHko avatar 3axap4eHko commented on July 17, 2024

@kdy1 new swcx command throws the following error

HTTPError: Response code 404 (Not Found)
    at Request.<anonymous> (/home/zource/projects/interoperability/node_modules/@mole-inc/bin-wrapper/index.cjs:7017:44)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_NON_2XX_3XX_RESPONSE',
  timings: {
    start: 1695049918109,
    socket: 1695049918110,
    lookup: 1695049918144,
    connect: 1695049918178,
    secureConnect: 1695049918222,
    upload: 1695049918222,
    response: 1695049918262,
    end: 1695049918375,
    error: undefined,
    abort: undefined,
    phases: {
      wait: 1,
      dns: 34,
      tcp: 34,
      tls: 44,
      request: 0,
      firstByte: 40,
      download: 113,
      total: 266
    }
  }
}

from cli.

kdy1 avatar kdy1 commented on July 17, 2024

@3axap4eHko Can you provide a repro?

from cli.

3axap4eHko avatar 3axap4eHko commented on July 17, 2024

@kdy1 in this repo https://github.com/3axap4eHko/interoperability just try yarn and then yarn swcx --help

from cli.

kdy1 avatar kdy1 commented on July 17, 2024

I tried several things, but seems like the ignore option of the native CLI is not working well.

Relevant code: https://github.com/swc-project/swc/blob/f66da772202a6f065488fbabb7e0a9d9a2d7089d/bindings/swc_cli/src/commands/compile.rs#L160-L167

Can you file an issue on the main repository instead?

from cli.

kdy1 avatar kdy1 commented on July 17, 2024

@3axap4eHko

This is the patch you should apply, regardless of the state of cli issues:

diff --git a/package.json b/package.json
index 638dd2e..0aaf316 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
     "inop": "bin/inop.js"
   },
   "scripts": {
-    "build": "rm -rf build && swc ./src -d build && rm -rf build/__tests__ && tsc --declaration --emitDeclarationOnly",
+    "build": "rm -rf build && swcx compile ./src --out-dir build && rm -rf build/__tests__ && tsc --declaration --emitDeclarationOnly",
     "test": "jest",
     "build:example": "(cd example && npm run build)",
     "test:example": "(cd example && npm run test)"
@@ -42,7 +42,7 @@
     "interoperability"
   ],
   "dependencies": {
-    "@swc/core": "^1.3.63",
+    "@swc/core": "^1.3.85",
     "commander": "^11.0.0",
     "fast-glob": "^3.2.12"
   },
diff --git a/yarn.lock b/yarn.lock
index 3386727..e90369b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -676,7 +676,7 @@
   resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.85.tgz#5c7f3f366804b512cf26e1731d8714f0409f1204"
   integrity sha512-ktxWOMFJ0iqKn6WUHtXqi4CS7xkyHmrRtjllGRuGqxmLmDX/HSOfuQ55Tm1KXKk5oHLacJkUbOSF2kBrpZ8dpg==
 
-"@swc/core@^1.3.63":
+"@swc/core@^1.3.85":
   version "1.3.85"
   resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.85.tgz#36ce756854efa2320f601a2b3e1ca1096f8b3f16"
   integrity sha512-qnoxp+2O0GtvRdYnXgR1v8J7iymGGYpx6f6yCK9KxipOZOjrlKILFANYlghQxZyPUfXwK++TFxfSlX4r9wK+kg==

from cli.

3axap4eHko avatar 3axap4eHko commented on July 17, 2024

@kdy1 I can confirm --ignore option does not work on swcx either

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.