mirror of
https://github.com/zebrajr/react.git
synced 2025-12-07 00:20:28 +01:00
* Add Node ESM loader build This adds a loader build as a first-class export. This will grow in complexity so it deserves its own module. * Add Node CommonJS regiter build This adds a build as a first-class export for legacy CommonJS registration in Node.js. This will grow in complexity so it deserves its own module. * Simplify fixture a bit to easier show usage with or without esm * Bump es version We leave async function in here which are newer than ES2015.
32 lines
814 B
JavaScript
32 lines
814 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
'use strict';
|
|
|
|
// Files that are transformed and can use ES6/Flow/JSX.
|
|
const esNextPaths = [
|
|
// Internal forwarding modules
|
|
'packages/*/*.js',
|
|
'packages/*/esm/*.js',
|
|
// Source files
|
|
'packages/*/src/**/*.js',
|
|
'packages/dom-event-testing-library/**/*.js',
|
|
'packages/react-interactions/**/*.js',
|
|
'packages/react-interactions/**/*.js',
|
|
'packages/shared/**/*.js',
|
|
// Shims and Flow environment
|
|
'scripts/flow/*.js',
|
|
'scripts/rollup/shims/**/*.js',
|
|
];
|
|
|
|
// Files that we distribute on npm that should be ES5-only.
|
|
const es5Paths = ['packages/*/npm/**/*.js'];
|
|
|
|
module.exports = {
|
|
esNextPaths,
|
|
es5Paths,
|
|
};
|