[Pkg-javascript-devel] babel 7 bootstrap problem and reify
Pirate Praveen
praveen at onenetbeyond.org
Tue Jan 21 07:50:37 GMT 2020
On തി, Jan 20, 2020 at 21:45, Pirate Praveen
<praveen at onenetbeyond.org> wrote:
> Hi,
>
> Just came across this module today https://github.com/benjamn/reify I
> was wondering if we could use this module to load ES6 files of babel
> directly (as we are stuck trying to build babel 7 and it needs babel
> 7 to build).
>
> Comments?
>
> Praveen
>
With the following lines in .babelrc, some packages/* can be build with
babeljs 6.
{
"presets": [
"env",
"flow"
],
"plugins": [
[
"transform-object-rest-spread",
]
],
}
babeljs packages/babel-plugin-proposal-class-properties/src -d
packages/babel-plugin-proposal-class-properties/lib
packages/babel-plugin-proposal-class-properties/src/index.js ->
packages/babel-plugin-proposal-class-properties/lib/index.js
But some packages are using babel 7 only plugins. For example, building
babel-core fails with this error. Anyone knows which plugin is used
here?
babeljs packages/babel-core/src/ -d packages/babel-core/lib
SyntaxError: packages/babel-core/src/config/caching.js: Unexpected
token (49:56)
47 | handler: (ArgT, CacheConfigurator<SideChannel>) =>
Handler<ResultT> | ResultT,
48 | ): (ArgT, SideChannel) => Handler<ResultT> {
> 49 | return makeCachedFunction<ArgT, ResultT, SideChannel,
*>(WeakMap, handler);
| ^
50 | }
51 |
52 | export function makeWeakCacheSync<ArgT, ResultT, SideChannel>(
>
More information about the Pkg-javascript-devel
mailing list