🎉Welcome to Bit Cloud's new home!Start freeor check out our newcommunity site

react

v2.0.0arrow_drop_down
v2.0.0
v1.0.30
v1.0.23
v1.0.22
v1.0.21
v1.0.20
v1.0.19
v1.0.18
v1.0.17
v1.0.16
v1.0.15
v1.0.14
v1.0.13
v1.0.12
v1.0.11
v1.0.10
v1.0.9
v1.0.8
v1.0.7
v1.0.6
v1.0.5
v1.0.4
v1.0.3
v1.0.2
v1.0.1
v1.0.0
v0.0.15
v0.0.14
v0.0.13
v0.0.12
v0.0.11
v0.0.10
v0.0.9
v0.0.8
v0.0.7
v0.0.6
v0.0.5
v0.0.4
v0.0.3
v0.0.2
v0.0.1
STATUS
Passing
DOWNLOADS
102,918
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
1 year ago
SIZE
454 KB
Bit React compiler. Compiles React components with Bit.
6 contributors
Install react as a package?
Copied
npm i @bit/bit.envs.compilers.react
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Files
index.ts
21 Lines(17 sloc)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import '@babel/preset-env';
import '@babel/preset-react';
import '@babel/plugin-proposal-class-properties';
import '@babel/plugin-proposal-export-default-from';
import '@babel/plugin-proposal-export-namespace-from';
import '@babel/plugin-proposal-object-rest-spread';
import '@babel/plugin-proposal-optional-chaining';
import '@babel/plugin-proposal-nullish-coalescing-operator';
import Vinyl from 'vinyl';
// @ts-ignore
import baseCompile from '@bit/bit.envs.internal.babel-base-compiler';

const compiledFileTypes = ['js', 'jsx'];

const compile = (files: Vinyl[], distPath: string) => {
  return baseCompile(files, distPath, __dirname, compiledFileTypes);
};

export default {
  compile,
};
Help and resources