mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-01 19:27:48 +02:00
* chore: minor typo cleanup * fix tests Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
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.
|
|
*/
|
|
|
|
module.exports = {
|
|
env: {
|
|
// USED FOR NODE/RUNTIME
|
|
// maybe we should differentiate both cases because
|
|
// we mostly need to transpile some features so that node does not crash...
|
|
lib: {
|
|
presets: [
|
|
['@babel/preset-typescript', {isTSX: true, allExtensions: true}],
|
|
],
|
|
// Useful to transpile for older node versions
|
|
plugins: [
|
|
'@babel/plugin-transform-modules-commonjs',
|
|
'@babel/plugin-proposal-nullish-coalescing-operator',
|
|
'@babel/plugin-proposal-optional-chaining',
|
|
],
|
|
},
|
|
|
|
// USED FOR JS SWIZZLE
|
|
// /lib-next folder is used as source to swizzle JS source code
|
|
// This JS code is created from TS source code
|
|
// This source code should look clean/human readable to be usable
|
|
'lib-next': {
|
|
presets: [
|
|
['@babel/preset-typescript', {isTSX: true, allExtensions: true}],
|
|
],
|
|
},
|
|
},
|
|
};
|