stealjs / steal

Gets JavaScript
https://stealjs.com
MIT License
1.36k stars 522 forks source link

Add support for Babel 7 #1497

Open chasenlehara opened 5 years ago

chasenlehara commented 5 years ago

This was asked about in Slack: https://bitovi-community.slack.com/archives/CFDDX9MJS/p1559748953000400

marshallswain commented 3 years ago

Upgrading StealJS to use Babel 7

Babel Migration Guide

steal

Question: why do some modules get imported with double @, like "@@babel-code-frame"?

Bundled Dependencies in /ext

Other files

this.paths["babel"] = dirname+"/ext/babel.js";
this.paths["babel-runtime"] = dirname+"/ext/babel-runtime.js";
this.paths["@@babel-code-frame"] = dirname+"/ext/babel-code-frame.js";

Babel-related Tests

Same as `steal-tools?

Docs

steal-tools

Babel Modules & Related Files

Babel-related Tests

These next tests are for general babel functionality and should likely continue to work without changes after the upgrade.

Docs

pYr0x commented 3 years ago

hey marshallswain,

i don't think there is any benefit to upgrade stealJS. There are several alternatives like viteJS and rollup. Loading a website with stealJS in production takes a long time compared to viteJS and rollup. Even in development these tools are much faster then stealJS (which is loading package.json -files). i usually requested 100 files in dev, Even with deps-bundles.

i converted my projects to viteJS and rollup if i don't care about IE. Otherwise, I use webpack.

stealjs was a nice project, but missed the boat with other projects

marshallswain commented 3 years ago

Thanks, @pYr0x,we were actually looking and fixing some really large projects using Steal, but determined that the upgrade would not have fixed the particular issue we were having because Babel is unable to transform the code in question with any existing plugins.

I agree with you on Vite being amazing. I use it for all of my personal projects, now. It's so fast that you don't have time to think, let alone take a short break, between code changes. I keep having the thought to make a stache adapter for it because it would save so much development time. Maybe someday I will actually do it.

pYr0x commented 3 years ago

here is a vite-stache-plugin https://github.com/pYr0x/vite-plugin-stache i created some other plugins for snowpack and rollup as well: https://github.com/pYr0x?tab=repositories

marshallswain commented 3 years ago

@pYr0x Oh wow. That's awesome! Thanks for sharing. I'll try it out!