Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spack: meta issue #841

Open
4 of 10 tasks
kdy1 opened this issue Jun 13, 2020 · 9 comments
Open
4 of 10 tasks

spack: meta issue #841

kdy1 opened this issue Jun 13, 2020 · 9 comments

Comments

@kdy1
Copy link
Member

kdy1 commented Jun 13, 2020

I'll publish the initial version without doing tasks written here.

Tasks

  • type

  • app - Bundles everything, just like webpack

  • lib - Preserve module requires, just like rollup

  • Watch mode

  • Small fix for node_resolver (We need to include .ts by default)

  • spack.config.ts

  • swc.bundle([conf1, conf2])

  • Handle dynamic import

  • Provide webpack-like plugin / loader /resolver api

This is really a show-stopper. I'm going to publish first version without support for plugins. This requires one of the below, as spack uses all cpu cores.

@kdy1 kdy1 changed the title spack: Issues spack: meta issue Jun 13, 2020
@kdy1 kdy1 pinned this issue Jun 13, 2020
@jakajancar
Copy link

Hey, is spack on crates.io yet?
All I'm seeing is the spack crate, but the docs just point to https://swc-project.github.io/rustdoc/swc/.

(And on the side note, is there an actual crate that exposes swc:: that is documented on the above link, or do you need to include individual components?)

@kdy1
Copy link
Member Author

kdy1 commented Jul 24, 2020

@jakajancar Sorry for late response.
I don't think spack as a crate is mature enough to be published. It's api will be changed frequently, just like the swc crate.

Managing multi crate repository is a big pain if some of those are published...

@kdy1
Copy link
Member Author

kdy1 commented Aug 12, 2020

@jakajancar Bundler is now on crates.io
See: https://crates.io/crates/swc_bundler

@jrop
Copy link

jrop commented Oct 1, 2020

@kdy1 Is there a recommended way to invoke spack at build-time (e.g., from a build.rs script)? That is all I really want from a spack-API.

@kdy1
Copy link
Member Author

kdy1 commented Oct 2, 2020

@jrop You can use Process

@jrop
Copy link

jrop commented Oct 2, 2020

@kdy1 I was hoping to avoid a dependency on NodeJS

@ScottAwesome
Copy link

@kdy1 I was hoping to avoid a dependency on NodeJS

I don't think you can, since SWC uses neon for parts of the parser and interop. One way or another you'll need to have node installed if I understand this correctly.

@kdy1
Copy link
Member Author

kdy1 commented Apr 18, 2021

It's possible, but I'm not sure if it worths.

@Brooooooklyn
Copy link
Member

I don't think you can, since SWC uses neon for parts of the parser and interop.

@ScottAwesome no, swc uses napi-rs

@kdy1 kdy1 unpinned this issue Jul 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants