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

Function rollupEffectorSolid

tools/builder/rollup.ts:305–367  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

303}
304
305export async function rollupEffectorSolid() {
306 const name = 'effector-solid'
307
308 await Promise.all([
309 createEsCjs(name, {
310 file: {
311 cjs: dir(`npm/${name}/${name}.cjs.js`),
312 es: dir(`npm/${name}/${name}.mjs`),
313 },
314 inputExtension: 'ts',
315 }),
316 createSSR({
317 file: {
318 cjs: dir(`npm/${name}/scope.js`),
319 es: dir(`npm/${name}/scope.mjs`),
320 },
321 }),
322 createUmd(name, {
323 external: externals,
324 file: dir(`npm/${name}/${name}.umd.js`),
325 umdName: 'effectorSolid',
326 globals: {
327 effector: 'effector',
328 'solid-js': 'SolidJS',
329 },
330 extension: 'ts',
331 }),
332 ])
333
334 async function createSSR({
335 file: {cjs, es},
336 }: {
337 file: {cjs: string; es: string}
338 }) {
339 await Promise.all([runBuild(cjs, 'cjs'), runBuild(es, 'es')])
340 async function runBuild(file: string, format: 'cjs' | 'es') {
341 const plugins = getPlugins(name, {isEsm: format === 'es'})
342 const pluginList = [
343 plugins.resolve,
344 plugins.json,
345 plugins.babel,
346 plugins.terser,
347 plugins.analyzer,
348 plugins.analyzerJSON,
349 ]
350 const build = await rollup({
351 onwarn,
352 input: dir(`packages/${name}/scope.ts`),
353 external: externals,
354 plugins: pluginList,
355 })
356 await build.write({
357 file,
358 format,
359 freeze: false,
360 name,
361 sourcemap: true,
362 sourcemapPathTransform: getSourcemapPathTransform(name),

Callers

nothing calls this directly

Calls 4

dirFunction · 0.90
createEsCjsFunction · 0.85
createSSRFunction · 0.85
createUmdFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…