@epilot360/webpack-config-epilot360 3.0.0 → 3.1.1
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.
|
@@ -9,7 +9,9 @@ const StandaloneSingleSpaPlugin = require("standalone-single-spa-webpack-plugin"
|
|
|
9
9
|
const SystemJSPublicPathPlugin = require("systemjs-webpack-interop/SystemJSPublicPathWebpackPlugin");
|
|
10
10
|
const TerserPlugin = require("terser-webpack-plugin");
|
|
11
11
|
const resolveCwd = require('resolve-cwd');
|
|
12
|
-
const
|
|
12
|
+
const WebpackVersionFilePlugin = require('webpack-version-file-plugin');
|
|
13
|
+
const env = require('./env')();
|
|
14
|
+
const { stripIndent } = require('common-tags');
|
|
13
15
|
|
|
14
16
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
|
|
15
17
|
|
|
@@ -41,6 +43,10 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
41
43
|
const argv = opts.argv || {};
|
|
42
44
|
const isProduction = argv.p || argv.mode === "production";
|
|
43
45
|
|
|
46
|
+
const packageFile = path.resolve(
|
|
47
|
+
process.cwd(),
|
|
48
|
+
'package.json',
|
|
49
|
+
)
|
|
44
50
|
const mfeEntrypoint = path.resolve(
|
|
45
51
|
process.cwd(),
|
|
46
52
|
'src',
|
|
@@ -160,6 +166,19 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
160
166
|
systemjsModuleName: `@${opts.orgName}/${opts.projectName}`,
|
|
161
167
|
rootDirectoryLevel: opts.rootDirectoryLevel,
|
|
162
168
|
}),
|
|
169
|
+
new WebpackVersionFilePlugin({
|
|
170
|
+
packageFile,
|
|
171
|
+
templateString: stripIndent`
|
|
172
|
+
{
|
|
173
|
+
"name": "<%= package.name %>",
|
|
174
|
+
"version": "<%= package.version %>",
|
|
175
|
+
"timestamp": <%= extras.timestamp %>
|
|
176
|
+
}`,
|
|
177
|
+
outputFile: 'version.json',
|
|
178
|
+
extras: {
|
|
179
|
+
'timestamp': Date.now(),
|
|
180
|
+
},
|
|
181
|
+
}),
|
|
163
182
|
!isProduction && !opts.disableHtmlGeneration && new HtmlWebpackPlugin(),
|
|
164
183
|
!isProduction &&
|
|
165
184
|
!opts.disableHtmlGeneration &&
|
|
@@ -192,6 +211,7 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
192
211
|
"react-dom",
|
|
193
212
|
"axios",
|
|
194
213
|
"lodash",
|
|
214
|
+
"lodash/fp",
|
|
195
215
|
"js-yaml",
|
|
196
216
|
"handlebars",
|
|
197
217
|
"moment",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot360/webpack-config-epilot360",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "A webpack config for in-browser modules used with single-spa for Epilot360",
|
|
5
5
|
"main": "lib/webpack-config-epilot360-portal.js",
|
|
6
6
|
"directories": {
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"lib"
|
|
11
11
|
],
|
|
12
|
+
"homepage": "https://gitlab.com/e-pilot/product/360-portal/epilot360-dev-utils/-/tree/main/packages/webpack-config-epilot360-portal",
|
|
12
13
|
"scripts": {},
|
|
13
14
|
"dependencies": {
|
|
15
|
+
"common-tags": "^1.8.2",
|
|
14
16
|
"css-loader": "^5.0.1",
|
|
15
17
|
"esbuild-loader": "^2.18.0",
|
|
16
18
|
"file-loader": "^6.2.0",
|
|
@@ -28,7 +30,8 @@
|
|
|
28
30
|
"webpack-bundle-analyzer": "^4.8.0",
|
|
29
31
|
"webpack-cli": "^5.0.1",
|
|
30
32
|
"webpack-dev-server": "^4.13.2",
|
|
31
|
-
"webpack-merge": "^5.8.0"
|
|
33
|
+
"webpack-merge": "^5.8.0",
|
|
34
|
+
"webpack-version-file-plugin": "^0.5.0"
|
|
32
35
|
},
|
|
33
36
|
"devDependencies": {
|
|
34
37
|
"acorn-import-assertions": "^1.7.6"
|