Giter Site home page Giter Site logo

Bundler about swc HOT 13 CLOSED

swc-project avatar swc-project commented on May 7, 2024 12
Bundler

from swc.

Comments (13)

TheLarkInn avatar TheLarkInn commented on May 7, 2024 18

Maybe we can work to take the most time intensive pieces of existing bundlers and avoid overlapping work :) <3 webpack team :)

from swc.

TheLarkInn avatar TheLarkInn commented on May 7, 2024 18

@kdy1 if you have intention to make a bundler, our team would be happy to share our learnings and design from webpack if you find it valuable. Feel free and reach out!!!!

from swc.

nick-at-hawkfish avatar nick-at-hawkfish commented on May 7, 2024 5

In my opinion, Rollup's plugin architecture and ease-of-use is much better than Webpack. I'd suggest using Rollup as inspiration on how to write a solid plugin system. See https://rollupjs.org/guide/en/#plugins-overview

from swc.

ForsakenHarmony avatar ForsakenHarmony commented on May 7, 2024 1

yeah I'd say this should be more like webpack :^)

from swc.

anru avatar anru commented on May 7, 2024 1

@kdy1 btw, there is https://pax.js.org/ for that purpose

from swc.

kdy1 avatar kdy1 commented on May 7, 2024 1

@nick-at-hawkfish @wldcordeiro Thank you guys for opinions. I really need some, but it is very hard to hear from real users.

from swc.

wldcordeiro avatar wldcordeiro commented on May 7, 2024 1

This could be a fun learning opportunity contributing for Rust. Thanks for the responsiveness. I'm testing this tool out with some projects and see lots of potential. πŸ˜„

from swc.

jrop avatar jrop commented on May 7, 2024 1

@kdy1 You really should take @TheLarkInn up on his offer to share learnings πŸ˜„ He is on the Webpack core team, after all!

from swc.

kdy1 avatar kdy1 commented on May 7, 2024

@anru I were porting it, but I stuck at api design.

At now, I don't have a clear idea about plugin api.

from swc.

LuoZijun avatar LuoZijun commented on May 7, 2024

@kdy1

Note: The pax work with --es-syntax-everywhere option should be define process.env object.

px --es-syntax-everywhere in.js out.js

from swc.

kdy1 avatar kdy1 commented on May 7, 2024

I used (and tried) many build tools, but I doubt that there is a clear winner. So I want to hear various opinions about the bundlers.

I want to determine the plugin api. Interop with javascript from rust is a very hard task, so I want to write it once.


Can anyone here help me determining api related to the plugins? Any opinion is welcome.

I think important parts of plugin api are

  • When to run

I'm considering something like a loader from webpack.

  • What should a plugin responsible for

I have no idea.

from swc.

wldcordeiro avatar wldcordeiro commented on May 7, 2024

In my opinion, Rollup's plugin architecture and ease-of-use is much better than Webpack. I'd suggest using Rollup as inspiration on how to write a solid plugin system. See https://rollupjs.org/guide/en/#plugins-overview

I like this suggestion as well! I do think the two serve slightly different usecases (basically libraries vs apps) primarily so perhaps building a tool that is able to work in the two modes maybe hard. I do find rollup to be an easier tool to configure and use though with its architecture so totally a better inspiration there!

from swc.

swc-bot avatar swc-bot commented on May 7, 2024

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

from swc.

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.