Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 10:29
    kdy1 commented #417
  • 10:29
    kdy1 commented #417
  • 02:58
    zurp edited #417
  • 02:50
    zurp opened #417
  • Aug 02 20:09
    duncanbeevers commented #411
  • Jul 30 14:24
    dartess edited #411
  • Jul 30 14:18
    duncanbeevers commented #411
  • Jul 29 11:15
    kdy1 assigned #416
  • Jul 29 11:15
    kdy1 milestoned #416
  • Jul 29 11:15
    kdy1 commented #416
  • Jul 29 10:52
    Diokuz opened #416
  • Jul 26 21:18
    joaomilho commented #160
  • Jul 26 08:00
    Diokuz opened #415
  • Jul 26 07:55
    Diokuz commented #413
  • Jul 26 07:55
    Diokuz commented #413
  • Jul 26 07:53
    kdy1 commented #414
  • Jul 26 07:50
    Diokuz opened #414
  • Jul 25 11:42
    kdy1 commented #413
  • Jul 25 11:37
    Diokuz opened #413
  • Jul 22 22:15
    dartess closed #412
Duncan Beevers
@duncanbeevers
Previously, I was using swc in my project via the npm module.
Evert Bouw
@evertbouw
swc is supposed to support all of TS? So should I report anything it can't build that tsc can?
강동윤
@kdy1
@duncanbeevers Yes. You can clone lastest version of node-swc (https://github.com/swc-project/node-swc) and run neon build --release && npm link
@duncanbeevers Then you can run npm link swc from the projcect which uses swc.
@evertbouw Yes. Please feel free to report anything.
강동윤
@kdy1
@duncanbeevers swc@1.0.6 is published and #154 and #162 are fixed
Evert Bouw
@evertbouw
type Foo = (bar?: string) => string;

const foo: Foo = (bar = "asdf") => bar;
this causes
error: Expected Comma, got Some(AssignOp("="))
 --> C:\projects\asdf\src\index.ts:3:23
  |
3 | const foo: Foo = (bar = "asdf") => bar;
  |                       ^
Evert Bouw
@evertbouw
import { useRef } from "react";

export const useSomeRef = <E extends HTMLElement = HTMLDivElement>(
    initialState = null,
) => {
    const ref = useRef<E>(initialState);

    return ref;
};
causes
error: Unexpected token Some(Word(E))
 --> C:\projects\asdf\src\useSomeRef.ts:3:28
  |
3 | export const useSomeRef = <E extends HTMLElement = HTMLDivElement>(
  |                            ^
Sebastian K
@Nimelrian
Yeah, TS support is still a little bumpy
Duncan Beevers
@duncanbeevers
Sorry, I'm new to this toolchain. In node-swc, I'm getting complained-at for not using the nightly compiler.
I tried setting the option when I ran the compiler installer.
2019-02-12 at 9.16 AM.png
But I initially installed with the default options.
Yuriy Panarin
@PxyUp

import 'chart.js';

import angular from 'angular';

ERROR in ./src/client/app/app.module.js
Module build failed (from ./node_modules/swc-loader/src/index.js):

What can i do?
@kdy1
export const VALUATION_STATE = 'admin-default.valuation';
and this one
Duncan Beevers
@duncanbeevers
@PxyUp What version swc are you running? Start out by invoking swc directly on the file in question. If you're running 1.0.6 there's a known bug with some import statements. swc-project/swc#171
Nate Mara
@natemara
@duncanbeevers what is the output of rustc --version?
Duncan Beevers
@duncanbeevers
rustc 1.32.0 (9fda7c223 2019-01-16)
Do I need to do a full uninstall / reinstall or something?
Nate Mara
@natemara
no
Duncan Beevers
@duncanbeevers
Okay, I was able to get things working with rustup toolchain nightly; rustup default nightly
Nate Mara
@natemara
cool
Duncan Beevers
@duncanbeevers
I build node-swc, then npm link and yarn link. In my project I yarn link swc. Then in my project I use yarn link swc to link in my version. From my project, when I run swc --version I still see 0.1.7 (whereas the package.json in node-swc version is 0.1.6), and I still see the import issues trying to build my project.
In node-swc, I see the swc = { git = "https://github.com/swc-project/swc.git" } dependency in native/Cargo.toml.
But it seems like maybe the linked module is still using an out-of-date swc?
강동윤
@kdy1
@duncanbeevers There's Cargo.lock in the repository and it's prevent node-swc from updating automatically
you can run (cd node-swc/native && cargo update) to use master
강동윤
@kdy1
I'm in progress of publishing 1.0.7.
Duncan Beevers
@duncanbeevers
Lots of changes today!
Sebastian K
@Nimelrian
And lots of new bugs I found^^
Mikhail Malyshev
@mlshv

Hi everyone! I've noticed that "Become a backer" link in README.md points to webpack page

https://github.com/swc-project/swc/blob/master/README.md

강동윤
@kdy1
@mlshv I'll fix it soon (I'm on mobile now)
@mlshv Fix it with desktop mode :)
Duncan Beevers
@duncanbeevers
Are you planning on namespacing the swc-loader package as well?
강동윤
@kdy1
@duncanbeevers I'm not sure about it. I didn't namesapced it because 1. babel-loader lives outside of @babel namespace 2. @swc/loader may be used by our own bundler
Nate Mara
@natemara
How does the transformAsync method work behind the scenes? Is there a threadpool for consuming all CPU cores with transformations?
강동윤
@kdy1
@natemara nodejs has it'
it's own worker pool
transformAsync works on worker thread
강동윤
@kdy1
Please move to slack (gitter's notification doesnot work for me, and it's annoying)
Michael Sunwoo (AvatarLabs)
@micsun-al
Hi all, this project sounds awesome :) ... the checkbox left of "es2015 > object-super" isn't checked .. does that mean ... class extends Some.Class { constructor(blah) { super(blah) } } ... isn't supported?
강동윤
@kdy1
It's supported by classes pass
object in object super pass means object literal ({})
moondaddi
@mattdamon108
Hi there
aolko
@aolko
hey there
is this room dead or..?
Kelly Thomas Kline
@kellytk
Is https://github.com/swc-project/swc suitable for taking the --target web JS output of wasm-pack as input and generating a single amalgamated JS file that can be naively linked into an HTML file?