@codemoreira/esad 1.4.6-10 → 1.4.6-12

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/plugin/index.js +14 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemoreira/esad",
3
- "version": "1.4.6-10",
3
+ "version": "1.4.6-12",
4
4
  "description": "Easy Super App Development - Zero-Config CLI and DevTools for React Native Module Federation",
5
5
  "main": "src/plugin/index.js",
6
6
  "types": "./src/plugin/index.d.ts",
@@ -36,8 +36,21 @@ function withESAD(env, options) {
36
36
  output: {
37
37
  path: path.resolve(dirname, 'build', platform),
38
38
  filename: 'index.bundle',
39
- clean: true,
39
+ chunkFilename: '[name].chunk.bundle',
40
40
  },
41
+ ...((options.type === 'host' && dev !== false) ? {
42
+ devServer: {
43
+ hot: true,
44
+ port: 8081,
45
+ historyApiFallback: true,
46
+ proxy: [
47
+ {
48
+ context: ['/.expo/.virtual-metro-entry'],
49
+ pathRewrite: { '^/.expo/.virtual-metro-entry': '/index' },
50
+ },
51
+ ],
52
+ },
53
+ } : {}),
41
54
  resolve: {
42
55
  ...Repack.getResolveOptions(platform),
43
56
  alias: {
@@ -110,17 +123,6 @@ function withESAD(env, options) {
110
123
  ],
111
124
  };
112
125
 
113
- if (options.type === 'host') {
114
- config.devServer = {
115
- proxy: [
116
- {
117
- context: ['/.expo/.virtual-metro-entry'],
118
- pathRewrite: { '^/.expo/.virtual-metro-entry': '/index.bundle' },
119
- },
120
- ],
121
- };
122
- }
123
-
124
126
  return config;
125
127
  }
126
128