babel / babel-standalone

:video_game: Now located in the Babel repo! Standalone build of Babel for use in non-Node.js environments, including browsers.
https://github.com/babel/babel/tree/master/packages/babel-standalone
MIT License
819 stars 121 forks source link

Prebuilt 7 beta? #95

Closed RobertCZ closed 6 years ago

RobertCZ commented 6 years ago

Can we have prebuilt 7 beta or updated instructions how to build it? With this move to main Babel repo everything changed but README not updated and I'm getting lost between the old docs and the new Babel. Want to test this TypeScript support :-) Thanks, Daniel.

existentialism commented 6 years ago

@RobertCZ hey! check out: https://unpkg.com/babel-standalone@7.0.0-beta.2/

RobertCZ commented 6 years ago

Cool, thanks

RobertCZ commented 6 years ago

Just a quick check: this is supposed to have all there plugins, right? Im getting Invalid plugin error on "transform-typescript"

Daniel15 commented 6 years ago

Plugins need to be manually added to babel-standalone (we intentionally don't automatically bundle all plugins; see the discussion on https://github.com/babel/babel/pull/6177). It's possible you'll need to submit a PR to the Babel repo to add the plugin.

Sent from my phone.

On Oct 6, 2017 5:59 PM, "RobertCZ" notifications@github.com wrote:

Just a quick check: this is supposed to have all there plugins, right? Im getting Invalid plugin error on "transform-typescript"

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/babel/babel-standalone/issues/95#issuecomment-334674824, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFnHVAt0FXLjixxzCRqUAj6yW49JiVmks5spc_igaJpZM4PvJ0H .

RobertCZ commented 6 years ago

What "manually added" exactly means? I tried npm install --save-dev babel-plugin-module-resolver in the babel-standalone folder, added module-resolver to registerPlugins in src/index.js and did make build in a babel root folder. Got build warnings about Critical dependency: the request of a dependency is an expression and then got runtime error Cannot read property '1' of undefined at Plugin.manipulateOptions

For context: I'm using babel-standalone with RequireJS and es6 plugin for in-browser transpiling. Currently using resolveModuleSource option to inject es6! prefix to all imported modules to have them transpiled automatically too. Babel 7 now moves this functionality into module-resolver plugin and I'm having issues adding it to the custom babel-standalone build.

RobertCZ commented 6 years ago

Re-closing as original issue was solved, but more docs how to build babel standalone 7 with custom modules would be really helpful.