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

Function runBuild

tools/builder/rollup.ts:272–301  ·  view source on GitHub ↗
(file: string, format: 'cjs' | 'es')

Source from the content-addressed store, hash-verified

270 }) {
271 await Promise.all([runBuild(cjs, 'cjs'), runBuild(es, 'es')])
272 async function runBuild(file: string, format: 'cjs' | 'es') {
273 const isEsm = format === 'es'
274 const plugins = getPlugins(name, {
275 isEsm,
276 replaceReactShim: isEsm,
277 })
278 const pluginList = [
279 plugins.resolve,
280 plugins.json,
281 plugins.babel,
282 plugins.terser,
283 plugins.analyzer,
284 plugins.analyzerJSON,
285 ]
286 const build = await rollup({
287 onwarn,
288 input: dir(`packages/${name}/scope.ts`),
289 external: externals,
290 plugins: pluginList,
291 })
292 await build.write({
293 file,
294 format,
295 freeze: false,
296 name,
297 sourcemap: true,
298 sourcemapPathTransform: getSourcemapPathTransform(name),
299 externalLiveBindings: isEsm,
300 })
301 }
302 }
303}
304

Callers 1

createSSRFunction · 0.85

Calls 3

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…