UNPKG

@storybook/angular

Version:

Storybook for Angular: Develop, document, and test UI components in isolation

9 lines (5 loc) 1.01 kB
'use strict'; var path = require('path'); var __require=(x=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(x,{get:(a,b)=>(typeof require<"u"?require:a)[b]}):x)(function(x){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+x+'" is not supported')});function loadEsmModule(modulePath){return new Function("modulePath","return import(modulePath);")(modulePath)}var runNgcc=async()=>{let ngcc;try{ngcc=__require("@angular/compiler-cli/ngcc");}catch{ngcc=await loadEsmModule("@angular/compiler-cli/ngcc");}ngcc.process({async:!1,basePath:path.join(process.cwd(),"node_modules"),createNewEntryPointFormats:!0,compileAllFormats:!1});},webpack=async(webpackConfig,options)=>{let framework=await options.presets.apply("framework");return (typeof framework=="object"?framework.options:{}).enableIvy===!1?webpackConfig:{...webpackConfig,resolve:{...webpackConfig.resolve,mainFields:["browser","module","main"]}}}; exports.runNgcc = runNgcc; exports.webpack = webpack;