@epilot360/webpack-config-epilot360 2.4.5 → 2.5.0

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: [
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.0",
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": {