@twilio/flex-plugin-webpack5 0.0.1 → 7.1.4-alpha.202610140448
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/LICENSE +21 -0
- package/README.md +39 -3
- package/dist/compiler.d.ts +38 -0
- package/dist/compiler.js +252 -0
- package/dist/compiler.js.map +1 -0
- package/dist/devServer/ipcServer.d.ts +73 -0
- package/dist/devServer/ipcServer.js +253 -0
- package/dist/devServer/ipcServer.js.map +1 -0
- package/dist/devServer/pluginServer.d.ts +79 -0
- package/dist/devServer/pluginServer.js +313 -0
- package/dist/devServer/pluginServer.js.map +1 -0
- package/dist/devServer/webpackDevServer.d.ts +11 -0
- package/dist/devServer/webpackDevServer.js +110 -0
- package/dist/devServer/webpackDevServer.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +42 -0
- package/dist/index.js.map +1 -0
- package/dist/plugins/DelayRenderStaticPlugin.d.ts +4 -0
- package/dist/plugins/DelayRenderStaticPlugin.js +64 -0
- package/dist/plugins/DelayRenderStaticPlugin.js.map +1 -0
- package/dist/prints/devServerSuccessful.d.ts +12 -0
- package/dist/prints/devServerSuccessful.js +48 -0
- package/dist/prints/devServerSuccessful.js.map +1 -0
- package/dist/prints/dotEnvIncorrectVariable.d.ts +2 -0
- package/dist/prints/dotEnvIncorrectVariable.js +11 -0
- package/dist/prints/dotEnvIncorrectVariable.js.map +1 -0
- package/dist/prints/index.d.ts +3 -0
- package/dist/prints/index.js +13 -0
- package/dist/prints/index.js.map +1 -0
- package/dist/prints/remotePluginNotFound.d.ts +9 -0
- package/dist/prints/remotePluginNotFound.js +57 -0
- package/dist/prints/remotePluginNotFound.js.map +1 -0
- package/dist/webpack/clientVariables.d.ts +25 -0
- package/dist/webpack/clientVariables.js +107 -0
- package/dist/webpack/clientVariables.js.map +1 -0
- package/dist/webpack/pnpTs.d.ts +10 -0
- package/dist/webpack/pnpTs.js +14 -0
- package/dist/webpack/pnpTs.js.map +1 -0
- package/dist/webpack/webpack.config.d.ts +74 -0
- package/dist/webpack/webpack.config.js +569 -0
- package/dist/webpack/webpack.config.js.map +1 -0
- package/dist/webpack/webpack.dev.d.ts +22 -0
- package/dist/webpack/webpack.dev.js +80 -0
- package/dist/webpack/webpack.dev.js.map +1 -0
- package/package.json +78 -2
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Configuration } from 'webpack-dev-server-wp5';
|
|
2
|
+
import { WebpackTypeWp5 } from '..';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the base {@link Configuration}
|
|
5
|
+
* @private
|
|
6
|
+
*/
|
|
7
|
+
export declare const _getBase: () => Configuration;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the {@link Configuration} for static type
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
export declare const _getStaticConfiguration: (config: Configuration) => Configuration;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the {@link Configuration} for JS type
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
export declare const _getJavaScriptConfiguration: (config: Configuration) => Configuration;
|
|
18
|
+
/**
|
|
19
|
+
* Generates a webpack-dev configuration
|
|
20
|
+
*/
|
|
21
|
+
declare const _default: (type: WebpackTypeWp5) => Configuration;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._getJavaScriptConfiguration = exports._getStaticConfiguration = exports._getBase = void 0;
|
|
4
|
+
var flex_dev_utils_1 = require("@twilio/flex-dev-utils");
|
|
5
|
+
var urls_1 = require("@twilio/flex-dev-utils/dist/urls");
|
|
6
|
+
var fs_1 = require("@twilio/flex-dev-utils/dist/fs");
|
|
7
|
+
var __1 = require("..");
|
|
8
|
+
/**
|
|
9
|
+
* Returns the base {@link Configuration}
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
// eslint-disable-next-line import/no-unused-modules
|
|
13
|
+
var _getBase = function () {
|
|
14
|
+
var local = (0, urls_1.getLocalAndNetworkUrls)(flex_dev_utils_1.env.getPort()).local;
|
|
15
|
+
return {
|
|
16
|
+
compress: true,
|
|
17
|
+
static: {},
|
|
18
|
+
client: {
|
|
19
|
+
logging: 'info',
|
|
20
|
+
webSocketURL: {
|
|
21
|
+
hostname: local.host,
|
|
22
|
+
pathname: local.url,
|
|
23
|
+
port: local.port,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
host: flex_dev_utils_1.env.getHost(),
|
|
27
|
+
port: flex_dev_utils_1.env.getPort(),
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
exports._getBase = _getBase;
|
|
31
|
+
/**
|
|
32
|
+
* Returns the {@link Configuration} for static type
|
|
33
|
+
* @private
|
|
34
|
+
*/
|
|
35
|
+
// eslint-disable-next-line import/no-unused-modules
|
|
36
|
+
var _getStaticConfiguration = function (config) {
|
|
37
|
+
config.static = [(0, fs_1.getPaths)().app.publicDir, (0, fs_1.getPaths)().scripts.devAssetsDir];
|
|
38
|
+
config.historyApiFallback = {
|
|
39
|
+
disableDotRule: true,
|
|
40
|
+
index: '/',
|
|
41
|
+
};
|
|
42
|
+
config.static.publicPath = '/';
|
|
43
|
+
config.static.watch = true;
|
|
44
|
+
return config;
|
|
45
|
+
};
|
|
46
|
+
exports._getStaticConfiguration = _getStaticConfiguration;
|
|
47
|
+
/**
|
|
48
|
+
* Returns the {@link Configuration} for JS type
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
// eslint-disable-next-line import/no-unused-modules
|
|
52
|
+
var _getJavaScriptConfiguration = function (config) {
|
|
53
|
+
var socket = flex_dev_utils_1.env.getWSSocket();
|
|
54
|
+
config.static.serveIndex = false;
|
|
55
|
+
// We're using native sockjs-node
|
|
56
|
+
config.webSocketServer = 'ws';
|
|
57
|
+
config.client.webSocketURL = {
|
|
58
|
+
hostname: socket.host,
|
|
59
|
+
pathname: socket.path,
|
|
60
|
+
port: socket.port,
|
|
61
|
+
};
|
|
62
|
+
config.hot = false;
|
|
63
|
+
return config;
|
|
64
|
+
};
|
|
65
|
+
exports._getJavaScriptConfiguration = _getJavaScriptConfiguration;
|
|
66
|
+
/**
|
|
67
|
+
* Generates a webpack-dev configuration
|
|
68
|
+
*/
|
|
69
|
+
/* c8 ignore next */
|
|
70
|
+
exports.default = (function (type) {
|
|
71
|
+
var config = (0, exports._getBase)();
|
|
72
|
+
if (type === __1.WebpackTypeWp5.Static) {
|
|
73
|
+
return (0, exports._getStaticConfiguration)(config);
|
|
74
|
+
}
|
|
75
|
+
if (type === __1.WebpackTypeWp5.JavaScript) {
|
|
76
|
+
return (0, exports._getJavaScriptConfiguration)(config);
|
|
77
|
+
}
|
|
78
|
+
return (0, exports._getJavaScriptConfiguration)((0, exports._getStaticConfiguration)(config));
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=webpack.dev.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webpack.dev.js","sourceRoot":"","sources":["../../src/webpack/webpack.dev.ts"],"names":[],"mappings":";;;AAAA,yDAA6C;AAC7C,yDAA0E;AAE1E,qDAA0D;AAE1D,wBAAoC;AAEpC;;;GAGG;AACH,oDAAoD;AAC7C,IAAM,QAAQ,GAAG;IACd,IAAA,KAAK,GAAK,IAAA,6BAAsB,EAAC,oBAAG,CAAC,OAAO,EAAE,CAAC,MAA1C,CAA2C;IAExD,OAAO;QACL,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,EAAE;QACV,MAAM,EAAE;YACN,OAAO,EAAE,MAAM;YACf,YAAY,EAAE;gBACZ,QAAQ,EAAE,KAAK,CAAC,IAAI;gBACpB,QAAQ,EAAE,KAAK,CAAC,GAAG;gBACnB,IAAI,EAAE,KAAK,CAAC,IAAI;aACjB;SACF;QACD,IAAI,EAAE,oBAAG,CAAC,OAAO,EAAE;QACnB,IAAI,EAAE,oBAAG,CAAC,OAAO,EAAE;KAC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AAuB,EAAC,MAAM,CAAC,CAAC;KACxC;IACD,IAAI,IAAI,KAAK,kBAAc,CAAC,UAAU,EAAE;QACtC,OAAO,IAAA,mCAA2B,EAAC,MAAM,CAAC,CAAC;KAC5C;IAED,OAAO,IAAA,mCAA2B,EAAC,IAAA,+BAAuB,EAAC,MAAM,CAAC,CAAC,CAAC;AACtE,CAAC,EAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,87 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twilio/flex-plugin-webpack5",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.1.4-alpha.202610140448",
|
|
4
|
+
"description": "Flex Plugin Webpack and Webpack dev-server configurations",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"flex",
|
|
7
|
+
"plugins",
|
|
8
|
+
"scripts",
|
|
9
|
+
"twilio",
|
|
10
|
+
"webpack"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/twilio/flex-plugin-builder",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/twilio/flex-plugin-builder/issues"
|
|
15
|
+
},
|
|
5
16
|
"repository": {
|
|
6
17
|
"type": "git",
|
|
7
18
|
"url": "git+https://github.com/twilio/flex-plugin-builder.git"
|
|
8
19
|
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"author": "Flex Runtime <flex-runtime@twilio.com>",
|
|
22
|
+
"main": "dist/index.js",
|
|
23
|
+
"types": "dist/index.d.ts",
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"prebuild": "npm run clean",
|
|
29
|
+
"build": "cd ../.. && tsc -p \"packages/flex-plugin-webpack5/tsconfig.json\"",
|
|
30
|
+
"clean": "rm -rf dist",
|
|
31
|
+
"lint": "eslint --ext ts src/",
|
|
32
|
+
"lint:fix": "npm run lint -- --fix",
|
|
33
|
+
"test": "cd ../.. && jest packages/flex-plugin-webpack5 --color",
|
|
34
|
+
"test:watch": "cd ../.. && jest packages/flex-plugin-webpack5 --watch --color"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@babel/core": "^7.22.10",
|
|
38
|
+
"@babel/preset-env": "^7.22.10",
|
|
39
|
+
"@babel/preset-modules": "^0.1.6",
|
|
40
|
+
"@babel/preset-react": "^7.22.5",
|
|
41
|
+
"@babel/preset-typescript": "^7.22.11",
|
|
42
|
+
"@k88/cra-webpack-hot-dev-client": "^1.1.0",
|
|
43
|
+
"@k88/format-webpack-messages": "^1.1.0",
|
|
44
|
+
"@k88/module-scope-plugin": "^1.1.0",
|
|
45
|
+
"@twilio/flex-dev-utils": "7.1.4-alpha.202610140448",
|
|
46
|
+
"@types/express-serve-static-core": "^4.17.35",
|
|
47
|
+
"babel-loader": "^9.1.3",
|
|
48
|
+
"babel-plugin-named-asset-import": "^0.3.8",
|
|
49
|
+
"babel-preset-react-app": "^10.0.1",
|
|
50
|
+
"css-loader-wp5": "npm:css-loader@^6.8.1",
|
|
51
|
+
"dotenv": "^10.0.0",
|
|
52
|
+
"dotenv-webpack-wp5": "npm:dotenv-webpack@^8.0.1",
|
|
53
|
+
"fork-ts-checker-webpack-plugin": "^9.1.0",
|
|
54
|
+
"html-webpack-plugin-wp5": "npm:html-webpack-plugin@^5.5.3",
|
|
55
|
+
"lodash": "^4.17.21",
|
|
56
|
+
"node-ipc": "9.1.4",
|
|
57
|
+
"pnp-webpack-plugin": "^1.7.0",
|
|
58
|
+
"postcss": "^8.2.8",
|
|
59
|
+
"postcss-flexbugs-fixes": "^5.0.2",
|
|
60
|
+
"postcss-loader-wp5": "npm:postcss-loader@^7.3.3",
|
|
61
|
+
"postcss-preset-env": "^6.7.0",
|
|
62
|
+
"resolve-url-loader": "^4.0.0",
|
|
63
|
+
"sass": "^1.32.8",
|
|
64
|
+
"sass-loader-wp5": "npm:sass-loader@^13.3.2",
|
|
65
|
+
"style-loader-wp5": "npm:style-loader@^3.3.3",
|
|
66
|
+
"tapable": "^1.1.3",
|
|
67
|
+
"terser-webpack-plugin-wp5": "npm:terser-webpack-plugin@^5.3.9",
|
|
68
|
+
"ts-pnp": "^1.2.0",
|
|
69
|
+
"url-loader": "^4.1.1",
|
|
70
|
+
"webpack": "5.88.2",
|
|
71
|
+
"webpack-dev-server-wp5": "npm:webpack-dev-server@^4.15.1",
|
|
72
|
+
"webpack5": "npm:webpack@5.88.2"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@types/dotenv-webpack": "npm:@types/dotenv-webpack@^6.0.0",
|
|
76
|
+
"@types/node-ipc": "9.1.3",
|
|
77
|
+
"@types/tapable": "^1.0.8",
|
|
78
|
+
"@types/terser-webpack-plugin-wp5": "npm:@types/terser-webpack-plugin@^2.2.1",
|
|
79
|
+
"express-serve-static-core": "^0.1.1",
|
|
80
|
+
"typescript": "^4.9.5"
|
|
81
|
+
},
|
|
82
|
+
"engines": {
|
|
83
|
+
"node": "^18 || ^20 || ^22 || ^24"
|
|
84
|
+
},
|
|
9
85
|
"publishConfig": {
|
|
10
86
|
"access": "public"
|
|
11
87
|
}
|