@modern-js/app-tools 2.57.1-alpha.4 → 2.57.1-alpha.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1,3 @@
1
- export { handler } from './netlify-handler';
1
+ import { handler } from './netlify-handler.cjs';
2
+
3
+ export default handler;
@@ -56,7 +56,7 @@ const createNetlifyPreset = (appContext, modernConfig, needModernServer) => {
56
56
  const netlifyOutput = import_node_path.default.join(appDirectory, ".netlify");
57
57
  const funcsDirectory = import_node_path.default.join(netlifyOutput, "functions");
58
58
  const entryFilePath = import_node_path.default.join(funcsDirectory, "index.js");
59
- const handlerFilePath = import_node_path.default.join(funcsDirectory, "netlify-handler.js");
59
+ const handlerFilePath = import_node_path.default.join(funcsDirectory, "netlify-handler.cjs");
60
60
  return {
61
61
  async prepare() {
62
62
  await import_utils.fs.remove(netlifyOutput);
@@ -116,7 +116,7 @@ const createNetlifyPreset = (appContext, modernConfig, needModernServer) => {
116
116
  const pluginsCode = `[${plugins.map((plugin, index) => {
117
117
  return `plugin_${index}()`;
118
118
  }).join(",")}]`;
119
- let entryCode = (await import_utils.fs.readFile(import_node_path.default.join(__dirname, "./netlify-handler.js"))).toString();
119
+ let entryCode = (await import_utils.fs.readFile(import_node_path.default.join(__dirname, "./netlify-handler.cjs"))).toString();
120
120
  const serverAppContext = (0, import_utils2.serverAppContenxtTemplate)(appContext);
121
121
  entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", `"${import_utils.ROUTE_SPEC_FILE}"`).replace("p_dynamicProdOptions", JSON.stringify(dynamicProdOptions)).replace("p_plugins", pluginsCode).replace("p_sharedDirectory", serverAppContext.sharedDirectory).replace("p_apiDirectory", serverAppContext.apiDirectory).replace("p_lambdaDirectory", serverAppContext.lambdaDirectory);
122
122
  await import_utils.fs.writeFile(handlerFilePath, entryCode);
@@ -1,2 +1 @@
1
1
  export default handler;
2
- import { handler } from "./netlify-handler";
@@ -1 +1,2 @@
1
- export { handler } from "./netlify-handler";
1
+ export default handler;
2
+ import { handler } from './netlify-handler.cjs';
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.57.1-alpha.4",
18
+ "version": "2.57.1-alpha.6",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -87,20 +87,20 @@
87
87
  "mlly": "^1.6.1",
88
88
  "pkg-types": "^1.1.0",
89
89
  "std-env": "^3.7.0",
90
+ "@modern-js/plugin-data-loader": "2.57.0",
90
91
  "@modern-js/core": "2.57.0",
91
- "@modern-js/node-bundle-require": "2.57.0",
92
- "@modern-js/plugin": "2.57.0",
93
- "@modern-js/plugin-i18n": "2.57.0",
94
- "@modern-js/plugin-lint": "2.57.0",
95
- "@modern-js/rsbuild-plugin-esbuild": "2.57.0",
96
92
  "@modern-js/prod-server": "2.57.0",
97
93
  "@modern-js/server": "2.57.0",
98
- "@modern-js/server-core": "2.57.0",
99
- "@modern-js/plugin-data-loader": "2.57.0",
94
+ "@modern-js/rsbuild-plugin-esbuild": "2.57.0",
100
95
  "@modern-js/server-utils": "2.57.0",
96
+ "@modern-js/plugin": "2.57.0",
97
+ "@modern-js/node-bundle-require": "2.57.0",
101
98
  "@modern-js/types": "2.57.0",
102
99
  "@modern-js/uni-builder": "2.57.0",
103
- "@modern-js/utils": "2.57.0"
100
+ "@modern-js/utils": "2.57.0",
101
+ "@modern-js/plugin-i18n": "2.57.0",
102
+ "@modern-js/plugin-lint": "2.57.0",
103
+ "@modern-js/server-core": "2.57.0"
104
104
  },
105
105
  "devDependencies": {
106
106
  "@rsbuild/plugin-swc": "1.0.1-beta.3",