@teambit/bundler 0.0.976 → 0.0.978

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -159,6 +159,10 @@ export declare type MetaData = {
159
159
  * Env id (used usually to calculate the config)
160
160
  */
161
161
  envId?: string;
162
+ /**
163
+ * Whether the config is for an env template bundling
164
+ */
165
+ isEnvTemplate?: boolean;
162
166
  };
163
167
  export interface BundlerContext extends BuildContext {
164
168
  /**
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["bundler-context.ts"],"sourcesContent":["import { Component } from '@teambit/component';\nimport { BuildContext } from '@teambit/builder';\n\nexport type LibraryOptions = {\n /**\n * Specify a name for the library\n */\n name: string;\n // TODO: decide which exact types we want to support and their exact names\n /**\n * Configure how the library will be exposed\n * could be values like: 'umd', 'umd2', 'amd', 'commonjs',\n */\n type?: string;\n};\n\nexport type Entry = {\n /**\n * Specifies the name of each output file on disk\n */\n filename: string;\n /**\n * Module(s) that are loaded upon startup\n */\n import: string | string[];\n\n /**\n * Specify library options to bundle a library from current entry\n */\n library?: LibraryOptions;\n};\n\nexport type EntryMap = {\n [entryName: string]: Entry;\n};\n\nexport type Target = {\n /**\n * entries of the target.\n */\n entries: string[] | EntryMap;\n\n /**\n * array of components included in the target.\n */\n components: Component[];\n\n /**\n * output path of the target\n */\n outputPath: string;\n\n /**\n * This option determines the name of each output bundle\n */\n filename?: string;\n\n /**\n * This option determines the name of non-initial chunk files\n */\n chunkFilename?: string;\n\n /**\n * Whether to run compression by the bundler\n */\n compress?: boolean;\n\n /**\n * List of peer dependencies\n */\n peers?: string[];\n\n /**\n * config for html generation\n */\n html?: HtmlConfig[];\n\n /**\n * module targets to expose.\n */\n modules?: ModuleTarget[];\n\n /**\n * Name for the runtime chunk\n */\n runtimeChunkName?: string;\n\n /**\n * Different configuration related to chunking\n */\n chunking?: Chunking;\n\n /**\n * A path for the host root dir\n * Host root dir is usually the env root dir\n * This can be used in different bundle options which run require.resolve\n * for example when configuring webpack aliases or webpack expose loader on the peers deps\n */\n hostRootDir?: string;\n\n /**\n * Array of host dependencies, they are used later in case you use one of the following:\n *\n */\n hostDependencies?: string[];\n\n /**\n * Make the hostDependencies externals. externals (from webpack docs):\n * The externals configuration option provides a way of excluding dependencies from the output bundles.\n * Instead, the created bundle relies on that dependency to be present in the consumer's (any end-user application) environment.\n */\n externalizeHostDependencies?: boolean;\n\n /**\n * Make aliases for the hostDependencies.\n * the path of each one will be resolved by [hostRootDir, process.cwd(), __dirname]\n * this will usually replace the instance of import one of the host dependencies by the instance of the env provided it\n */\n aliasHostDependencies?: boolean;\n};\n\nexport type ModuleTarget = {\n /**\n * name of the module.\n */\n name: string;\n\n /**\n * module exposes.\n */\n exposes: {\n [internalPath: string]: string;\n };\n\n shared: {\n [key: string]: any;\n };\n};\n\nexport type HtmlConfig = {\n /**\n * The title to use for the generated HTML document\n */\n title: string;\n /**\n * The file to write the HTML to. Defaults to index.html\n */\n filename?: string;\n /**\n * Allows you to add only some chunks (e.g only the unit-test chunk)\n */\n chunks?: string[];\n /**\n * Load chunks according to their order in the `chunks` array\n * @default auto\n */\n chunkOrder?: 'auto' | 'manual';\n /**\n * provide an inline template\n */\n templateContent: string;\n /**\n * Controls if and in what ways the output should be minified\n */\n minify?: boolean;\n\n /**\n * The favicon for the html page\n */\n favicon?: string;\n\n // TODO: consider add chunksSortMode if there are more needs\n};\n\nexport type Chunking = {\n /**\n * include all types of chunks (async / non-async) in splitting\n */\n splitChunks: boolean;\n};\n\nexport type MetaData = {\n /**\n * Who initiate the bundling process\n */\n initiator?: string;\n /**\n * Env id (used usually to calculate the config)\n */\n envId?: string;\n};\nexport interface BundlerContext extends BuildContext {\n /**\n * targets for bundling.\n */\n targets: Target[];\n\n /**\n * determines whether it is a production build, default is `true`.\n * in development, expect the bundler to favour debugging on the expanse of optimization.\n */\n development?: boolean;\n\n /**\n * public path output of the bundle.\n */\n publicPath?: string;\n\n /**\n * root path\n */\n rootPath?: string;\n\n /**\n * Whether to run compression by the bundler\n */\n compress?: boolean;\n\n /**\n * config for html generation for all targets\n */\n html?: HtmlConfig[];\n\n /**\n * modules for bundle to expose. used by module federation at webpack, or with different methods applied by various bundlers.\n */\n modules?: {\n name: string;\n fileName: string;\n exposes: { [key: string]: string };\n };\n\n /**\n * Additional info that can be used by the bundler for different stuff like logging info\n */\n metaData?: MetaData;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["bundler-context.ts"],"sourcesContent":["import { Component } from '@teambit/component';\nimport { BuildContext } from '@teambit/builder';\n\nexport type LibraryOptions = {\n /**\n * Specify a name for the library\n */\n name: string;\n // TODO: decide which exact types we want to support and their exact names\n /**\n * Configure how the library will be exposed\n * could be values like: 'umd', 'umd2', 'amd', 'commonjs',\n */\n type?: string;\n};\n\nexport type Entry = {\n /**\n * Specifies the name of each output file on disk\n */\n filename: string;\n /**\n * Module(s) that are loaded upon startup\n */\n import: string | string[];\n\n /**\n * Specify library options to bundle a library from current entry\n */\n library?: LibraryOptions;\n};\n\nexport type EntryMap = {\n [entryName: string]: Entry;\n};\n\nexport type Target = {\n /**\n * entries of the target.\n */\n entries: string[] | EntryMap;\n\n /**\n * array of components included in the target.\n */\n components: Component[];\n\n /**\n * output path of the target\n */\n outputPath: string;\n\n /**\n * This option determines the name of each output bundle\n */\n filename?: string;\n\n /**\n * This option determines the name of non-initial chunk files\n */\n chunkFilename?: string;\n\n /**\n * Whether to run compression by the bundler\n */\n compress?: boolean;\n\n /**\n * List of peer dependencies\n */\n peers?: string[];\n\n /**\n * config for html generation\n */\n html?: HtmlConfig[];\n\n /**\n * module targets to expose.\n */\n modules?: ModuleTarget[];\n\n /**\n * Name for the runtime chunk\n */\n runtimeChunkName?: string;\n\n /**\n * Different configuration related to chunking\n */\n chunking?: Chunking;\n\n /**\n * A path for the host root dir\n * Host root dir is usually the env root dir\n * This can be used in different bundle options which run require.resolve\n * for example when configuring webpack aliases or webpack expose loader on the peers deps\n */\n hostRootDir?: string;\n\n /**\n * Array of host dependencies, they are used later in case you use one of the following:\n *\n */\n hostDependencies?: string[];\n\n /**\n * Make the hostDependencies externals. externals (from webpack docs):\n * The externals configuration option provides a way of excluding dependencies from the output bundles.\n * Instead, the created bundle relies on that dependency to be present in the consumer's (any end-user application) environment.\n */\n externalizeHostDependencies?: boolean;\n\n /**\n * Make aliases for the hostDependencies.\n * the path of each one will be resolved by [hostRootDir, process.cwd(), __dirname]\n * this will usually replace the instance of import one of the host dependencies by the instance of the env provided it\n */\n aliasHostDependencies?: boolean;\n};\n\nexport type ModuleTarget = {\n /**\n * name of the module.\n */\n name: string;\n\n /**\n * module exposes.\n */\n exposes: {\n [internalPath: string]: string;\n };\n\n shared: {\n [key: string]: any;\n };\n};\n\nexport type HtmlConfig = {\n /**\n * The title to use for the generated HTML document\n */\n title: string;\n /**\n * The file to write the HTML to. Defaults to index.html\n */\n filename?: string;\n /**\n * Allows you to add only some chunks (e.g only the unit-test chunk)\n */\n chunks?: string[];\n /**\n * Load chunks according to their order in the `chunks` array\n * @default auto\n */\n chunkOrder?: 'auto' | 'manual';\n /**\n * provide an inline template\n */\n templateContent: string;\n /**\n * Controls if and in what ways the output should be minified\n */\n minify?: boolean;\n\n /**\n * The favicon for the html page\n */\n favicon?: string;\n\n // TODO: consider add chunksSortMode if there are more needs\n};\n\nexport type Chunking = {\n /**\n * include all types of chunks (async / non-async) in splitting\n */\n splitChunks: boolean;\n};\n\nexport type MetaData = {\n /**\n * Who initiate the bundling process\n */\n initiator?: string;\n /**\n * Env id (used usually to calculate the config)\n */\n envId?: string;\n\n /**\n * Whether the config is for an env template bundling\n */\n isEnvTemplate?: boolean;\n};\nexport interface BundlerContext extends BuildContext {\n /**\n * targets for bundling.\n */\n targets: Target[];\n\n /**\n * determines whether it is a production build, default is `true`.\n * in development, expect the bundler to favour debugging on the expanse of optimization.\n */\n development?: boolean;\n\n /**\n * public path output of the bundle.\n */\n publicPath?: string;\n\n /**\n * root path\n */\n rootPath?: string;\n\n /**\n * Whether to run compression by the bundler\n */\n compress?: boolean;\n\n /**\n * config for html generation for all targets\n */\n html?: HtmlConfig[];\n\n /**\n * modules for bundle to expose. used by module federation at webpack, or with different methods applied by various bundlers.\n */\n modules?: {\n name: string;\n fileName: string;\n exposes: { [key: string]: string };\n };\n\n /**\n * Additional info that can be used by the bundler for different stuff like logging info\n */\n metaData?: MetaData;\n}\n"],"mappings":""}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_bundler@0.0.976/dist/bundler.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_bundler@0.0.976/dist/bundler.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_bundler@0.0.978/dist/bundler.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_bundler@0.0.978/dist/bundler.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/bundler",
3
- "version": "0.0.976",
3
+ "version": "0.0.978",
4
4
  "homepage": "https://bit.dev/teambit/compilation/bundler",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.compilation",
8
8
  "name": "bundler",
9
- "version": "0.0.976"
9
+ "version": "0.0.978"
10
10
  },
11
11
  "dependencies": {
12
12
  "cli-highlight": "2.1.9",
@@ -15,13 +15,13 @@
15
15
  "core-js": "^3.0.0",
16
16
  "@babel/runtime": "7.20.0",
17
17
  "@teambit/harmony": "0.4.6",
18
- "@teambit/envs": "0.0.976",
19
- "@teambit/builder": "0.0.976",
20
- "@teambit/component": "0.0.976",
21
- "@teambit/cli": "0.0.656",
22
- "@teambit/dependency-resolver": "0.0.976",
23
- "@teambit/graphql": "0.0.976",
24
- "@teambit/pubsub": "0.0.976",
18
+ "@teambit/envs": "0.0.978",
19
+ "@teambit/builder": "0.0.978",
20
+ "@teambit/component": "0.0.978",
21
+ "@teambit/cli": "0.0.657",
22
+ "@teambit/dependency-resolver": "0.0.978",
23
+ "@teambit/graphql": "0.0.978",
24
+ "@teambit/pubsub": "0.0.978",
25
25
  "@teambit/toolbox.network.get-port": "0.0.121"
26
26
  },
27
27
  "devDependencies": {
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@apollo/client": "^3.6.0",
38
- "@teambit/legacy": "1.0.438",
38
+ "@teambit/legacy": "1.0.439",
39
39
  "react": "^16.8.0 || ^17.0.0",
40
40
  "react-dom": "^16.8.0 || ^17.0.0"
41
41
  },