@teambit/webpack 0.0.673 → 0.0.676
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.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/dist/transformers/index.d.ts +1 -0
- package/dist/transformers/index.js +29 -0
- package/dist/transformers/index.js.map +1 -0
- package/dist/transformers/inject-body.d.ts +14 -0
- package/dist/transformers/inject-body.js +36 -0
- package/dist/transformers/inject-body.js.map +1 -0
- package/package-tar/teambit-webpack-0.0.676.tgz +0 -0
- package/package.json +9 -8
- package/{preview-1647141743465.js → preview-1647314610121.js} +1 -1
- package/transformers/index.ts +1 -0
- package/transformers/inject-body.ts +24 -0
- package/package-tar/teambit-webpack-0.0.673.tgz +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -11,3 +11,4 @@ export { WebpackBitReporterPlugin } from './plugins/webpack-bit-reporter-plugin'
|
|
|
11
11
|
export { fallbacks } from './config/webpack-fallbacks';
|
|
12
12
|
export { fallbacksAliases } from './config/webpack-fallbacks-aliases';
|
|
13
13
|
export { fallbacksProvidePluginConfig } from './config/webpack-fallbacks-provide-plugin-config';
|
|
14
|
+
export { GenerateBodyInjectionTransformer, BodyInjectionOptions } from './transformers';
|
package/dist/index.js
CHANGED
|
@@ -13,14 +13,28 @@ var _exportNames = {
|
|
|
13
13
|
WebpackBitReporterPlugin: true,
|
|
14
14
|
fallbacks: true,
|
|
15
15
|
fallbacksAliases: true,
|
|
16
|
-
fallbacksProvidePluginConfig: true
|
|
16
|
+
fallbacksProvidePluginConfig: true,
|
|
17
|
+
GenerateBodyInjectionTransformer: true,
|
|
18
|
+
BodyInjectionOptions: true
|
|
17
19
|
};
|
|
20
|
+
Object.defineProperty(exports, "BodyInjectionOptions", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return _transformers().BodyInjectionOptions;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
18
26
|
Object.defineProperty(exports, "Configuration", {
|
|
19
27
|
enumerable: true,
|
|
20
28
|
get: function () {
|
|
21
29
|
return _webpack4().Configuration;
|
|
22
30
|
}
|
|
23
31
|
});
|
|
32
|
+
Object.defineProperty(exports, "GenerateBodyInjectionTransformer", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _transformers().GenerateBodyInjectionTransformer;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
24
38
|
Object.defineProperty(exports, "WebpackAspect", {
|
|
25
39
|
enumerable: true,
|
|
26
40
|
get: function () {
|
|
@@ -190,4 +204,14 @@ function _webpackFallbacksProvidePluginConfig() {
|
|
|
190
204
|
return data;
|
|
191
205
|
}
|
|
192
206
|
|
|
207
|
+
function _transformers() {
|
|
208
|
+
const data = require("./transformers");
|
|
209
|
+
|
|
210
|
+
_transformers = function () {
|
|
211
|
+
return data;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
return data;
|
|
215
|
+
}
|
|
216
|
+
|
|
193
217
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA","sourcesContent":["export type {\n WebpackMain,\n WebpackConfigTransformer,\n WebpackConfigTransformContext,\n WebpackConfigDevServerTransformContext,\n GlobalWebpackConfigTransformContext,\n WebpackConfigDevServerTransformer,\n} from './webpack.main.runtime';\nexport { runTransformersWithContext } from './webpack.main.runtime';\nexport { WebpackAspect } from './webpack.aspect';\nexport { WebpackDevServer } from './webpack.dev-server';\nexport { WebpackBundler } from './webpack.bundler';\nexport type { WebpackConfigWithDevServer } from './webpack.dev-server';\nexport * from './events';\nexport { Configuration } from 'webpack';\nexport { WebpackConfigMutator } from '@teambit/webpack.modules.config-mutator';\nexport { WebpackBitReporterPlugin } from './plugins/webpack-bit-reporter-plugin';\nexport { fallbacks } from './config/webpack-fallbacks';\nexport { fallbacksAliases } from './config/webpack-fallbacks-aliases';\nexport { fallbacksProvidePluginConfig } from './config/webpack-fallbacks-provide-plugin-config';\nexport { GenerateBodyInjectionTransformer, BodyInjectionOptions } from './transformers';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GenerateBodyInjectionTransformer, BodyInjectionOptions } from './inject-body';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "BodyInjectionOptions", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _injectBody().BodyInjectionOptions;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "GenerateBodyInjectionTransformer", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _injectBody().GenerateBodyInjectionTransformer;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
function _injectBody() {
|
|
20
|
+
const data = require("./inject-body");
|
|
21
|
+
|
|
22
|
+
_injectBody = function () {
|
|
23
|
+
return data;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA","sourcesContent":["export { GenerateBodyInjectionTransformer, BodyInjectionOptions } from './inject-body';\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WebpackConfigTransformer } from '@teambit/webpack';
|
|
2
|
+
export declare type BodyInjectionOptions = {
|
|
3
|
+
content: string;
|
|
4
|
+
position?: 'start' | 'end';
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* A transformer that allow you to inject content into your html body
|
|
8
|
+
* We expose it from here, as it uses the inject-body-webpack-plugin which register to the html plugin hooks
|
|
9
|
+
* which means it depends on the fact that it has the same html plugin instance
|
|
10
|
+
* since, the html plugin is configured via the webpack aspect, expose it from here ensure the same instance
|
|
11
|
+
* @param options
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export declare function GenerateBodyInjectionTransformer(options: BodyInjectionOptions): WebpackConfigTransformer;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.GenerateBodyInjectionTransformer = GenerateBodyInjectionTransformer;
|
|
9
|
+
|
|
10
|
+
function _injectBodyWebpackPlugin() {
|
|
11
|
+
const data = _interopRequireDefault(require("inject-body-webpack-plugin"));
|
|
12
|
+
|
|
13
|
+
_injectBodyWebpackPlugin = function () {
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return data;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A transformer that allow you to inject content into your html body
|
|
22
|
+
* We expose it from here, as it uses the inject-body-webpack-plugin which register to the html plugin hooks
|
|
23
|
+
* which means it depends on the fact that it has the same html plugin instance
|
|
24
|
+
* since, the html plugin is configured via the webpack aspect, expose it from here ensure the same instance
|
|
25
|
+
* @param options
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
function GenerateBodyInjectionTransformer(options) {
|
|
29
|
+
return config => {
|
|
30
|
+
// @ts-ignore - https://github.com/Jaid/inject-body-webpack-plugin/issues/12
|
|
31
|
+
const plugin = new (_injectBodyWebpackPlugin().default)(options);
|
|
32
|
+
return config.addPlugin(plugin);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=inject-body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["inject-body.ts"],"names":["GenerateBodyInjectionTransformer","options","config","plugin","InjectBodyPlugin","addPlugin"],"mappings":";;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,gCAAT,CAA0CC,OAA1C,EAAmG;AACxG,SAAQC,MAAD,IAAY;AACjB;AACA,UAAMC,MAAM,GAAG,KAAIC,kCAAJ,EAAqBH,OAArB,CAAf;AAEA,WAAOC,MAAM,CAACG,SAAP,CAAiBF,MAAjB,CAAP;AACD,GALD;AAMD","sourcesContent":["import InjectBodyPlugin from 'inject-body-webpack-plugin';\nimport type { WebpackConfigTransformer } from '@teambit/webpack';\n\nexport type BodyInjectionOptions = {\n content: string;\n position?: 'start' | 'end';\n};\n\n/**\n * A transformer that allow you to inject content into your html body\n * We expose it from here, as it uses the inject-body-webpack-plugin which register to the html plugin hooks\n * which means it depends on the fact that it has the same html plugin instance\n * since, the html plugin is configured via the webpack aspect, expose it from here ensure the same instance\n * @param options\n * @returns\n */\nexport function GenerateBodyInjectionTransformer(options: BodyInjectionOptions): WebpackConfigTransformer {\n return (config) => {\n // @ts-ignore - https://github.com/Jaid/inject-body-webpack-plugin/issues/12\n const plugin = new InjectBodyPlugin(options);\n\n return config.addPlugin(plugin);\n };\n}\n"]}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/webpack",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.676",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/webpack/webpack",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.webpack",
|
|
8
8
|
"name": "webpack",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.676"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"webpack": "5.51.1",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"html-webpack-plugin": "5.3.2",
|
|
21
21
|
"webpack-assets-manifest": "5.1.0",
|
|
22
22
|
"react-dev-utils": "11.0.4",
|
|
23
|
+
"inject-body-webpack-plugin": "1.3.0",
|
|
23
24
|
"vm-browserify": "1.1.2",
|
|
24
25
|
"util": "0.12.3",
|
|
25
26
|
"url": "0.11.0",
|
|
@@ -44,11 +45,11 @@
|
|
|
44
45
|
"core-js": "^3.0.0",
|
|
45
46
|
"@teambit/webpack.modules.config-mutator": "0.0.137",
|
|
46
47
|
"@teambit/bit-error": "0.0.394",
|
|
47
|
-
"@teambit/bundler": "0.0.
|
|
48
|
-
"@teambit/logger": "0.0.
|
|
49
|
-
"@teambit/cli": "0.0.
|
|
50
|
-
"@teambit/pubsub": "0.0.
|
|
51
|
-
"@teambit/workspace": "0.0.
|
|
48
|
+
"@teambit/bundler": "0.0.676",
|
|
49
|
+
"@teambit/logger": "0.0.545",
|
|
50
|
+
"@teambit/cli": "0.0.453",
|
|
51
|
+
"@teambit/pubsub": "0.0.676",
|
|
52
|
+
"@teambit/workspace": "0.0.676",
|
|
52
53
|
"@teambit/webpack.modules.generate-externals": "0.0.3"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
"@types/node": "12.20.4"
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|
|
66
|
-
"@teambit/legacy": "1.0.
|
|
67
|
+
"@teambit/legacy": "1.0.232",
|
|
67
68
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
68
69
|
"react": "^16.8.0 || ^17.0.0"
|
|
69
70
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.webpack_webpack@0.0.
|
|
1
|
+
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.webpack_webpack@0.0.676/dist/webpack.composition.js')]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GenerateBodyInjectionTransformer, BodyInjectionOptions } from './inject-body';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import InjectBodyPlugin from 'inject-body-webpack-plugin';
|
|
2
|
+
import type { WebpackConfigTransformer } from '@teambit/webpack';
|
|
3
|
+
|
|
4
|
+
export type BodyInjectionOptions = {
|
|
5
|
+
content: string;
|
|
6
|
+
position?: 'start' | 'end';
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A transformer that allow you to inject content into your html body
|
|
11
|
+
* We expose it from here, as it uses the inject-body-webpack-plugin which register to the html plugin hooks
|
|
12
|
+
* which means it depends on the fact that it has the same html plugin instance
|
|
13
|
+
* since, the html plugin is configured via the webpack aspect, expose it from here ensure the same instance
|
|
14
|
+
* @param options
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export function GenerateBodyInjectionTransformer(options: BodyInjectionOptions): WebpackConfigTransformer {
|
|
18
|
+
return (config) => {
|
|
19
|
+
// @ts-ignore - https://github.com/Jaid/inject-body-webpack-plugin/issues/12
|
|
20
|
+
const plugin = new InjectBodyPlugin(options);
|
|
21
|
+
|
|
22
|
+
return config.addPlugin(plugin);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
Binary file
|