diff --git a/docs/angular/api-web/executors/package.md b/docs/angular/api-web/executors/package.md index 5688d002df6081..ae7bbbe4d957f8 100644 --- a/docs/angular/api-web/executors/package.md +++ b/docs/angular/api-web/executors/package.md @@ -76,6 +76,16 @@ Type: `boolean` CSS files will be extracted to the output folder. +### format + +Alias(es): f + +Default: `esm,umd` + +Type: `string` + +Only build the specified comma-separated formats (esm,umd,cjs) + ### globals Type: `object[]` diff --git a/docs/node/api-web/executors/package.md b/docs/node/api-web/executors/package.md index 16e75c3c7021bf..6a0869fcb59f59 100644 --- a/docs/node/api-web/executors/package.md +++ b/docs/node/api-web/executors/package.md @@ -77,6 +77,16 @@ Type: `boolean` CSS files will be extracted to the output folder. +### format + +Alias(es): f + +Default: `esm,umd` + +Type: `string` + +Only build the specified comma-separated formats (esm,umd,cjs) + ### globals Type: `object[]` diff --git a/docs/react/api-web/executors/package.md b/docs/react/api-web/executors/package.md index 16e75c3c7021bf..6a0869fcb59f59 100644 --- a/docs/react/api-web/executors/package.md +++ b/docs/react/api-web/executors/package.md @@ -77,6 +77,16 @@ Type: `boolean` CSS files will be extracted to the output folder. +### format + +Alias(es): f + +Default: `esm,umd` + +Type: `string` + +Only build the specified comma-separated formats (esm,umd,cjs) + ### globals Type: `object[]` diff --git a/e2e/react/src/react-package.test.ts b/e2e/react/src/react-package.test.ts index dbb466d40cb001..4c6f17db31c70f 100644 --- a/e2e/react/src/react-package.test.ts +++ b/e2e/react/src/react-package.test.ts @@ -5,6 +5,7 @@ import { newProject, readFile, readJson, + rmDist, runCLI, uniq, updateFile, @@ -118,9 +119,66 @@ describe('Build React libraries and apps', () => { return JSON.stringify(json, null, 2); }); }); + afterEach(() => killPorts()); describe('Publishable libraries', () => { + it('should build libraries with and without dependencies', () => { + /* + * 1. Without dependencies + */ + const childLibOutput = runCLI(`build ${childLib}`) + // FIX for windows and OSX where output names might get broken to multipleline + .replace(/\s\s\s││\s\s\s/gm, ''); + const childLib2Output = runCLI(`build ${childLib2}`) + // FIX for windows and OSX where output names might get broken to multipleline + .replace(/\s\s\s││\s\s\s/gm, ''); + + expect(childLibOutput).toContain(`${childLib}.umd.js`); + expect(childLibOutput).toContain(`${childLib}.esm.js`); + expect(childLibOutput).toContain(`Bundle complete: ${childLib}`); + + expect(childLib2Output).toContain(`${childLib2}.esm.js`); + expect(childLib2Output).toContain(`${childLib2}.umd.js`); + expect(childLib2Output).toContain(`Bundle complete: ${childLib2}`); + + checkFilesExist(`dist/libs/${childLib}/assets/hello.txt`); + checkFilesExist(`dist/libs/${childLib}/README.md`); + + /* + * 2. With dependencies + */ + let parentLibOutput = runCLI(`build ${parentLib}`) + // FIX for windows and OSX where output names might get broken to multipleline + .replace(/\s\s\s││\s\s\s/gm, ''); + + expect(parentLibOutput).toContain(`${parentLib}.esm.js`); + expect(parentLibOutput).toContain(`${parentLib}.umd.js`); + expect(parentLibOutput).toContain(`Bundle complete: ${parentLib}`); + + const jsonFile = readJson(`dist/libs/${parentLib}/package.json`); + expect(jsonFile.peerDependencies).toEqual( + expect.objectContaining({ + [`@${proj}/${childLib}`]: '0.0.1', + [`@${proj}/${childLib2}`]: '0.0.1', + }) + ); + + /* + * 3. With dependencies without existing dist + */ + rmDist(); + + parentLibOutput = runCLI(`build ${parentLib} --with-deps`).replace( + /\s\s\s││\s\s\s/gm, + '' + ); + + expect(parentLibOutput).toContain(`Bundle complete: ${parentLib}`); + expect(parentLibOutput).toContain(`Bundle complete: ${childLib}`); + expect(parentLibOutput).toContain(`Bundle complete: ${childLib2}`); + }); + it('should preserve the tsconfig target set by user', () => { // Setup const myLib = uniq('my-lib'); @@ -172,53 +230,6 @@ describe('Build React libraries and apps', () => { expect(content).toContain('function __generator(thisArg, body) {'); }); - it('should build the library when it does not have any deps', () => { - const output = runCLI(`build ${childLib}`) - // FIX for windows and OSX where output names might get broken to multipleline - .replace(/\s\s\s││\s\s\s/gm, ''); - expect(output).toContain(`${childLib}.esm.js`); - expect(output).toContain(`Bundle complete: ${childLib}`); - checkFilesExist(`dist/libs/${childLib}/assets/hello.txt`); - }); - - it('should copy the README to dist', () => { - const output = runCLI(`build ${childLib2}`); - expect(output).toContain(`Bundle complete: ${childLib2}`); - checkFilesExist(`dist/libs/${childLib2}/README.md`); - }); - - it('should properly add references to any dependency into the parent package.json', () => { - const childLibOutput = runCLI(`build ${childLib}`) - // FIX for windows and OSX where output names might get broken to multipleline - .replace(/\s\s\s││\s\s\s/gm, ''); - const childLib2Output = runCLI(`build ${childLib2}`) - // FIX for windows and OSX where output names might get broken to multipleline - .replace(/\s\s\s││\s\s\s/gm, ''); - const parentLibOutput = runCLI(`build ${parentLib}`) - // FIX for windows and OSX where output names might get broken to multipleline - .replace(/\s\s\s││\s\s\s/gm, ''); - - expect(childLibOutput).toContain(`${childLib}.esm.js`); - expect(childLibOutput).toContain(`${childLib}.umd.js`); - expect(childLibOutput).toContain(`Bundle complete: ${childLib}`); - - expect(childLib2Output).toContain(`${childLib2}.esm.js`); - expect(childLib2Output).toContain(`${childLib2}.umd.js`); - expect(childLib2Output).toContain(`Bundle complete: ${childLib2}`); - - expect(parentLibOutput).toContain(`${parentLib}.esm.js`); - expect(parentLibOutput).toContain(`${parentLib}.umd.js`); - expect(parentLibOutput).toContain(`Bundle complete: ${parentLib}`); - - const jsonFile = readJson(`dist/libs/${parentLib}/package.json`); - expect(jsonFile.peerDependencies).toEqual( - expect.objectContaining({ - [`@${proj}/${childLib}`]: '0.0.1', - [`@${proj}/${childLib2}`]: '0.0.1', - }) - ); - }); - it('should build an app composed out of publishable libs', () => { const buildWithDeps = runCLI( `build ${app} --with-deps --buildLibsFromSource=false` @@ -235,14 +246,4 @@ describe('Build React libraries and apps', () => { expect(failedBuild).toContain(`Can't resolve`); }, 1000000); }); - - describe('Buildable libraries', () => { - it('should build dependent libraries', () => { - const parentLibOutput = runCLI(`build ${parentLib} --with-deps`); - - expect(parentLibOutput).toContain(`Bundle complete: ${parentLib}`); - expect(parentLibOutput).toContain(`Bundle complete: ${childLib}`); - expect(parentLibOutput).toContain(`Bundle complete: ${childLib2}`); - }); - }); }); diff --git a/packages/web/babel.ts b/packages/web/babel.ts index 2e968c34fb1a41..cd163cea00801f 100644 --- a/packages/web/babel.ts +++ b/packages/web/babel.ts @@ -36,7 +36,7 @@ module.exports = function (api: any, options: NxReactBabelPresetOptions = {}) { // All other options will fail in Jest since Node does not support some ES features // such as import syntax. process.env.NODE_ENV === 'test' - ? { targets: { node: 'current' } } + ? { targets: { node: 'current' }, loose: true } : { // Allow importing core-js in entrypoint and use browserlist to select polyfills. // This is needed for differential loading as well. @@ -48,6 +48,7 @@ module.exports = function (api: any, options: NxReactBabelPresetOptions = {}) { bugfixes: true, // Exclude transforms that make all code slower exclude: ['transform-typeof-symbol'], + loose: true, }, ], require.resolve('@babel/preset-typescript'), diff --git a/packages/web/package.json b/packages/web/package.json index faff4e4401f0ce..fc015aa628cc85 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -41,11 +41,11 @@ "@babel/plugin-transform-runtime": "^7.15.0", "@babel/runtime": "^7.14.8", "@babel/preset-typescript": "^7.15.0", - "@rollup/plugin-commonjs": "11.0.2", - "@rollup/plugin-babel": "5.0.2", - "@rollup/plugin-image": "2.0.4", + "@rollup/plugin-commonjs": "^20.0.0", + "@rollup/plugin-babel": "^5.3.0", + "@rollup/plugin-image": "^2.1.0", "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-node-resolve": "7.1.1", + "@rollup/plugin-node-resolve": "^13.0.4", "autoprefixer": "^10.2.5", "babel-loader": "8.1.0", "babel-plugin-const-enum": "^1.0.1", @@ -80,7 +80,7 @@ "rxjs": "^6.5.4", "rxjs-for-await": "0.0.2", "rimraf": "^3.0.2", - "rollup": "1.31.1", + "rollup": "^2.56.2", "rollup-plugin-copy": "^3.3.0", "rollup-plugin-filesize": "^9.0.0", "rollup-plugin-local-resolve": "^1.0.7", diff --git a/packages/web/src/executors/package/lib/normalize.ts b/packages/web/src/executors/package/lib/normalize.ts new file mode 100644 index 00000000000000..812b73ea568751 --- /dev/null +++ b/packages/web/src/executors/package/lib/normalize.ts @@ -0,0 +1,55 @@ +import { dirname } from 'path'; + +import { AssetGlobPattern } from '../../../utils/types'; +import { normalizeAssets, normalizePluginPath } from '../../../utils/normalize'; +import { WebPackageOptions } from '../schema'; + +export interface NormalizedWebPackageOptions extends WebPackageOptions { + entryRoot: string; + projectRoot: string; + assets: AssetGlobPattern[]; + rollupConfig: string[]; + formats: string[]; +} + +export function normalizePackageOptions( + options: WebPackageOptions, + root: string, + sourceRoot: string +): NormalizedWebPackageOptions { + const entryFile = `${root}/${options.entryFile}`; + const entryRoot = dirname(entryFile); + const project = `${root}/${options.project}`; + const projectRoot = dirname(project); + const outputPath = `${root}/${options.outputPath}`; + + let formats = []; + for (const format of options.format.split(',')) { + if (format !== 'cjs' && format !== 'esm' && format !== 'umd') + throw new Error(`Invalid format specified: ${format}`); + formats.push(format); + } + // de-dupe formats + formats = Array.from(new Set(formats)); + + if (options.buildableProjectDepsInPackageJsonType == undefined) { + options.buildableProjectDepsInPackageJsonType = 'peerDependencies'; + } + + return { + ...options, + formats, + rollupConfig: [] + .concat(options.rollupConfig) + .filter(Boolean) + .map((p) => normalizePluginPath(p, root)), + assets: options.assets + ? normalizeAssets(options.assets, root, sourceRoot) + : undefined, + entryFile, + entryRoot, + project, + projectRoot, + outputPath, + }; +} diff --git a/packages/web/src/executors/package/run-rollup.ts b/packages/web/src/executors/package/lib/run-rollup.ts similarity index 100% rename from packages/web/src/executors/package/run-rollup.ts rename to packages/web/src/executors/package/lib/run-rollup.ts diff --git a/packages/web/src/executors/package/package.impl.spec.ts b/packages/web/src/executors/package/package.impl.spec.ts index 9df4049dd6c356..97cf02e3e41d1b 100644 --- a/packages/web/src/executors/package/package.impl.spec.ts +++ b/packages/web/src/executors/package/package.impl.spec.ts @@ -1,16 +1,15 @@ -let mockCopyPlugin = jest.fn(); -jest.mock('rollup-plugin-copy', () => mockCopyPlugin); -jest.mock('tsconfig-paths-webpack-plugin'); - import { ExecutorContext } from '@nrwl/devkit'; -import { createRollupOptions } from './package.impl'; -import { PackageBuilderOptions } from '../../utils/types'; -import { normalizePackageOptions } from '../../utils/normalize'; import * as rollup from 'rollup'; +import { WebPackageOptions } from './schema'; +import { createRollupOptions } from './package.impl'; +import { normalizePackageOptions } from './lib/normalize'; + +jest.mock('rollup-plugin-copy', () => jest.fn()); +jest.mock('tsconfig-paths-webpack-plugin'); describe('packageExecutor', () => { let context: ExecutorContext; - let testOptions: PackageBuilderOptions; + let testOptions: WebPackageOptions; beforeEach(async () => { context = { @@ -30,11 +29,12 @@ describe('packageExecutor', () => { project: 'libs/ui/package.json', tsConfig: 'libs/ui/tsconfig.json', watch: false, + format: 'esm,umd', }; }); describe('createRollupOptions', () => { - it('should work', () => { + it('should create rollup options for valid config', () => { const result: any = createRollupOptions( normalizePackageOptions(testOptions, '/root', '/root/src'), [], @@ -43,22 +43,38 @@ describe('packageExecutor', () => { '/root/src', [] ); + expect(result.map((x) => x.output)).toEqual([ { - file: '/root/dist/ui/example.umd.js', - format: 'umd', + file: '/root/dist/ui/example.esm.js', + format: 'esm', globals: {}, name: 'Example', }, { - file: '/root/dist/ui/example.esm.js', - format: 'esm', + file: '/root/dist/ui/example.umd.js', + format: 'umd', globals: {}, name: 'Example', }, ]); }); + it('should handle invalid formats', () => { + testOptions.format = 'invalid,format'; + + expect(() => + createRollupOptions( + normalizePackageOptions(testOptions, '/root', '/root/src'), + [], + context, + { name: 'example' }, + '/root/src', + [] + ) + ).toThrow(/Invalid/); + }); + it('should handle custom config path', async () => { jest.mock( '/root/custom-rollup.config.ts', @@ -138,7 +154,8 @@ describe('packageExecutor', () => { '/root/src', [] ); - expect(mockCopyPlugin).toHaveBeenCalledWith({ + + expect(require('rollup-plugin-copy')).toHaveBeenCalledWith({ targets: [{ dest: '/root/dist/ui', src: 'C:/windows/path/README.md' }], }); }); diff --git a/packages/web/src/executors/package/package.impl.ts b/packages/web/src/executors/package/package.impl.ts index 5a91cf965b42e3..66d99f7c8b9b1e 100644 --- a/packages/web/src/executors/package/package.impl.ts +++ b/packages/web/src/executors/package/package.impl.ts @@ -1,6 +1,3 @@ -import type { ExecutorContext, ProjectGraphNode } from '@nrwl/devkit'; -import { logger, names, readJsonFile, writeJsonFile } from '@nrwl/devkit'; - import * as rollup from 'rollup'; import * as peerDepsExternal from 'rollup-plugin-peer-deps-external'; import * as localResolve from 'rollup-plugin-local-resolve'; @@ -11,6 +8,8 @@ import { catchError, concatMap, last, tap } from 'rxjs/operators'; import { eachValueFrom } from 'rxjs-for-await'; import * as autoprefixer from 'autoprefixer'; +import type { ExecutorContext, ProjectGraphNode } from '@nrwl/devkit'; +import { logger, names, readJsonFile, writeJsonFile } from '@nrwl/devkit'; import { readCachedProjectGraph } from '@nrwl/workspace/src/core/project-graph'; import { calculateProjectDependencies, @@ -19,17 +18,18 @@ import { DependentBuildableProjectNode, updateBuildableProjectPackageJsonDependencies, } from '@nrwl/workspace/src/utilities/buildable-libs-utils'; +import resolve from '@rollup/plugin-node-resolve'; -import { AssetGlobPattern, PackageBuilderOptions } from '../../utils/types'; +import { AssetGlobPattern } from '../../utils/types'; +import { deleteOutputDir } from '../../utils/delete-output-dir'; +import { WebPackageOptions } from './schema'; +import { runRollup } from './lib/run-rollup'; import { - NormalizedBundleBuilderOptions, + NormalizedWebPackageOptions, normalizePackageOptions, -} from '../../utils/normalize'; -import { deleteOutputDir } from '../../utils/delete-output-dir'; -import { runRollup } from './run-rollup'; +} from './lib/normalize'; // These use require because the ES import isn't correct. -const resolve = require('@rollup/plugin-node-resolve'); const commonjs = require('@rollup/plugin-commonjs'); const typescript = require('rollup-plugin-typescript2'); const image = require('@rollup/plugin-image'); @@ -38,21 +38,10 @@ const copy = require('rollup-plugin-copy'); const postcss = require('rollup-plugin-postcss'); const filesize = require('rollup-plugin-filesize'); -interface OutputConfig { - format: rollup.ModuleFormat; - extension: string; - declaration?: boolean; -} - -const outputConfigs: OutputConfig[] = [ - { format: 'umd', extension: 'umd' }, - { format: 'esm', extension: 'esm' }, -]; - const fileExtensions = ['.js', '.jsx', '.ts', '.tsx']; export default async function* run( - rawOptions: PackageBuilderOptions, + rawOptions: WebPackageOptions, context: ExecutorContext ) { const project = context.workspace.projects[context.projectName]; @@ -167,20 +156,14 @@ export default async function* run( // ----------------------------------------------------------------------------- export function createRollupOptions( - options: NormalizedBundleBuilderOptions, + options: NormalizedWebPackageOptions, dependencies: DependentBuildableProjectNode[], context: ExecutorContext, packageJson: any, sourceRoot: string, npmDeps: string[] ): rollup.InputOptions[] { - return outputConfigs.map((config) => { - const compilerOptions = createCompilerOptions( - config, - options, - dependencies - ); - + return options.formats.map((format) => { const plugins = [ copy({ targets: convertCopyAssetsToRollupOptions( @@ -193,7 +176,7 @@ export function createRollupOptions( check: true, tsconfig: options.tsConfig, tsconfigOverride: { - compilerOptions, + compilerOptions: createCompilerOptions(format, options, dependencies), }, }), peerDepsExternal({ @@ -222,19 +205,12 @@ export function createRollupOptions( babelHelpers: 'bundled', exclude: /node_modules/, plugins: [ - config.format === 'esm' + format === 'esm' ? undefined : require.resolve('babel-plugin-transform-async-to-promises'), ].filter(Boolean), }), - commonjs({ - namedExports: { - // This is needed because `react/jsx-runtime` exports `jsx` on the module export. - // Without this mapping the transformed import `import {jsx as _jsx} from 'react/jsx-runtime'` will fail. - 'react/jsx-runtime': ['jsx', 'jsxs', 'Fragment'], - 'react/jsx-dev-runtime': ['jsxDEV', 'Fragment'], - }, - }), + commonjs(), filesize(), json(), ]; @@ -255,8 +231,8 @@ export function createRollupOptions( input: options.entryFile, output: { globals, - format: config.format, - file: `${options.outputPath}/${context.projectName}.${config.extension}.js`, + format, + file: `${options.outputPath}/${context.projectName}.${format}.js`, name: options.umdName || names(context.projectName).className, }, external: (id) => @@ -271,31 +247,31 @@ export function createRollupOptions( }); } -function createCompilerOptions(config, options, dependencies) { +function createCompilerOptions(format, options, dependencies) { const compilerOptionPaths = computeCompilerOptionsPaths( options.tsConfig, dependencies ); - const baseCompilerOptions = { + const compilerOptions = { rootDir: options.entryRoot, allowJs: false, declaration: true, paths: compilerOptionPaths, }; - if (config.format !== 'esm') { + if (format !== 'esm') { return { - ...baseCompilerOptions, + ...compilerOptions, target: 'es5', }; } - return baseCompilerOptions; + return compilerOptions; } function updatePackageJson( - options: NormalizedBundleBuilderOptions, + options: NormalizedWebPackageOptions, context: ExecutorContext, target: ProjectGraphNode, dependencies: DependentBuildableProjectNode[], diff --git a/packages/web/src/executors/package/schema.d.ts b/packages/web/src/executors/package/schema.d.ts new file mode 100644 index 00000000000000..958c1027dee76d --- /dev/null +++ b/packages/web/src/executors/package/schema.d.ts @@ -0,0 +1,23 @@ +export interface Globals { + moduleId: string; + global: string; +} + +export interface WebPackageOptions { + outputPath: string; + tsConfig: string; + project: string; + entryFile: string; + extractCss?: boolean; + globals?: Globals[]; + external?: string[]; + rollupConfig?: string | string[]; + babelConfig?: string; + watch?: boolean; + assets?: any[]; + updateBuildableProjectDepsInPackageJson?: boolean; + buildableProjectDepsInPackageJsonType?: 'dependencies' | 'peerDependencies'; + umdName?: string; + deleteOutputPath?: boolean; + format: string; +} diff --git a/packages/web/src/executors/package/schema.json b/packages/web/src/executors/package/schema.json index bcd61dfb802393..7b9fc922114d95 100644 --- a/packages/web/src/executors/package/schema.json +++ b/packages/web/src/executors/package/schema.json @@ -25,6 +25,12 @@ "type": "string", "description": "The path to tsconfig file." }, + "format": { + "type": "string", + "alias": "f", + "description": "Only build the specified comma-separated formats (esm,umd,cjs)", + "default": "esm,umd" + }, "external": { "type": "array", "description": "A list of external modules that will not be bundled (react, react-dom, etc.).", diff --git a/packages/web/src/utils/normalize.spec.ts b/packages/web/src/utils/normalize.spec.ts index d0f51050f27c85..36613857e041ae 100644 --- a/packages/web/src/utils/normalize.spec.ts +++ b/packages/web/src/utils/normalize.spec.ts @@ -1,5 +1,5 @@ import { normalizeBuildOptions, normalizePackageOptions } from './normalize'; -import { BuildBuilderOptions, PackageBuilderOptions } from './types'; +import { BuildBuilderOptions, WebPackageBuilderOptions } from './types'; import * as fs from 'fs'; @@ -114,7 +114,7 @@ describe('normalizeBuildOptions', () => { }); describe('normalizePackageOptions', () => { - let testOptions: PackageBuilderOptions; + let testOptions: WebPackageBuilderOptions; let root: string; let sourceRoot: string; diff --git a/packages/web/src/utils/normalize.ts b/packages/web/src/utils/normalize.ts index c44253948ad9ed..fcbff4af708e06 100644 --- a/packages/web/src/utils/normalize.ts +++ b/packages/web/src/utils/normalize.ts @@ -1,11 +1,7 @@ import { WebBuildBuilderOptions } from '../executors/build/build.impl'; import { normalizePath } from '@nrwl/devkit'; -import { resolve, dirname, relative, basename } from 'path'; -import { - AssetGlobPattern, - BuildBuilderOptions, - PackageBuilderOptions, -} from './types'; +import { basename, dirname, relative, resolve } from 'path'; +import { AssetGlobPattern, BuildBuilderOptions } from './types'; import { statSync } from 'fs'; export interface FileReplacement { @@ -13,45 +9,6 @@ export interface FileReplacement { with: string; } -export interface NormalizedBundleBuilderOptions extends PackageBuilderOptions { - entryRoot: string; - projectRoot: string; - assets: AssetGlobPattern[]; - rollupConfig: string[]; -} - -export function normalizePackageOptions( - options: PackageBuilderOptions, - root: string, - sourceRoot: string -): NormalizedBundleBuilderOptions { - const entryFile = `${root}/${options.entryFile}`; - const entryRoot = dirname(entryFile); - const project = `${root}/${options.project}`; - const projectRoot = dirname(project); - const outputPath = `${root}/${options.outputPath}`; - - if (options.buildableProjectDepsInPackageJsonType == undefined) { - options.buildableProjectDepsInPackageJsonType = 'peerDependencies'; - } - - return { - ...options, - rollupConfig: [] - .concat(options.rollupConfig) - .filter(Boolean) - .map((p) => normalizePluginPath(p, root)), - assets: options.assets - ? normalizeAssets(options.assets, root, sourceRoot) - : undefined, - entryFile, - entryRoot, - project, - projectRoot, - outputPath, - }; -} - export function normalizeBuildOptions( options: T, root: string, @@ -70,7 +27,7 @@ export function normalizeBuildOptions( }; } -function normalizePluginPath(pluginPath: void | string, root: string) { +export function normalizePluginPath(pluginPath: void | string, root: string) { if (!pluginPath) { return ''; } diff --git a/packages/web/src/utils/types.ts b/packages/web/src/utils/types.ts index 9b9e8bc0dc16c0..7252816989277a 100644 --- a/packages/web/src/utils/types.ts +++ b/packages/web/src/utils/types.ts @@ -39,29 +39,6 @@ export interface BuildBuilderOptions { sourceRoot?: string; } -export interface Globals { - moduleId: string; - global: string; -} - -export interface PackageBuilderOptions { - outputPath: string; - tsConfig: string; - project: string; - entryFile: string; - extractCss?: boolean; - globals?: Globals[]; - external?: string[]; - rollupConfig?: string | string[]; - babelConfig?: string; - watch?: boolean; - assets?: any[]; - updateBuildableProjectDepsInPackageJson?: boolean; - buildableProjectDepsInPackageJsonType?: 'dependencies' | 'peerDependencies'; - umdName?: string; - deleteOutputPath?: boolean; -} - export interface AssetGlobPattern { glob: string; input: string;