MCPcopy Create free account
hub / github.com/effector/effector / createCompat

Function createCompat

tools/builder/rollup.ts:449–549  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

447 })
448}
449async function createCompat(name: string) {
450 const plugins = getPlugins(`${name}.compat`)
451
452 const {getAliases} = require('../babel.config')
453 const terserConfig = minifyConfig({
454 beautify: !!process.env.PRETTIFY,
455 })
456 const pluginList = [
457 plugins.resolve,
458 plugins.json,
459 babel({
460 babelHelpers: 'bundled',
461 extensions,
462 skipPreflightCheck: true,
463 exclude: /node_modules.*/,
464 babelrc: false,
465 presets: [
466 [
467 '@babel/preset-typescript',
468 {
469 isTSX: true,
470 allExtensions: true,
471 },
472 ],
473 ['@babel/preset-react', {useBuiltIns: false}],
474 [
475 '@babel/preset-env',
476 {
477 loose: true,
478 useBuiltIns: 'entry',
479 corejs: 3,
480 modules: false,
481 shippedProposals: true,
482 targets: compatTarget,
483 },
484 ],
485 ],
486 plugins: [
487 '@babel/plugin-transform-export-namespace-from',
488 '@babel/plugin-transform-optional-chaining',
489 '@babel/plugin-transform-nullish-coalescing-operator',
490 ['@babel/plugin-transform-class-properties', {loose: true}],
491 [
492 'babel-plugin-module-resolver',
493 {
494 alias: getAliases({
495 isBuild: true,
496 isTest: false,
497 isCompat: true,
498 isEsm: false,
499 }),
500 loglevel: 'silent',
501 },
502 ],
503 ],
504 }),
505 plugins.commonjs,
506 terser({

Callers 3

rollupEffectorFunction · 0.85
rollupEffectorReactFunction · 0.85
rollupEffectorVueFunction · 0.85

Calls 4

minifyConfigFunction · 0.90
dirFunction · 0.90
getPluginsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…