@epilot360/webpack-config-epilot360 2.4.5 → 2.5.2

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.
@@ -34,6 +34,11 @@ function webpackConfigEpilot360ReactApp(opts) {
34
34
  const argv = opts.argv || {};
35
35
  const isProduction = argv.p || argv.mode === "production";
36
36
 
37
+ const mfeEntrypoint = path.resolve(
38
+ process.cwd(),
39
+ 'src',
40
+ 'mfe-entrypoint.ts',
41
+ )
37
42
  const indexEntrypoint = path.resolve(
38
43
  process.cwd(),
39
44
  'src',
@@ -45,9 +50,11 @@ function webpackConfigEpilot360ReactApp(opts) {
45
50
  `${opts.orgName}-${opts.projectName}.tsx`
46
51
  )
47
52
 
53
+ const fileExists = (path) => fs.existsSync(path) ? path : null
54
+
48
55
  return {
49
56
  mode: isProduction ? "production" : "development",
50
- entry: fs.existsSync(indexEntrypoint) ? indexEntrypoint : legacyEntrypoint,
57
+ entry: fileExists(mfeEntrypoint) ?? fileExists(indexEntrypoint) ?? fileExists(legacyEntrypoint),
51
58
  output: {
52
59
  filename: `bundle.js`,
53
60
  libraryTarget: "system",
@@ -55,7 +62,7 @@ function webpackConfigEpilot360ReactApp(opts) {
55
62
  uniqueName: opts.projectName,
56
63
  devtoolNamespace: `${opts.projectName}`,
57
64
  publicPath: "",
58
- chunkFilename: 'chunk-[name].[chunkhash].bundle.js',
65
+ chunkFilename: 'chunk-[name].[chunkhash].js',
59
66
  },
60
67
  module: {
61
68
  rules: [
@@ -177,6 +184,8 @@ function webpackConfigEpilot360ReactApp(opts) {
177
184
  "axios",
178
185
  "lodash",
179
186
  "js-yaml",
187
+ "handlebars",
188
+ "moment",
180
189
  "@epilot/base-elements",
181
190
  "@epilot/base-modules",
182
191
  new RegExp(`^@epilot360/`), // all @epilot360/* packages will be treated as external
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot360/webpack-config-epilot360",
3
- "version": "2.4.5",
3
+ "version": "2.5.2",
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": {
@@ -27,7 +27,7 @@
27
27
  "webpack-bundle-analyzer": "^4.2.0",
28
28
  "webpack-cli": "^4.8.0",
29
29
  "webpack-dev-server": "^4.0.0",
30
- "webpack-env-prefix-plugin": "^1.1.0",
30
+ "webpack-env-prefix-plugin": "^1.1.1",
31
31
  "webpack-merge": "5.8.0"
32
32
  },
33
33
  "devDependencies": {