dinou 4.0.7 → 4.0.9

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 (34) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dinou/core/babel-esm-loader.js +1 -4
  3. package/dinou/core/build-static-pages.js +37 -40
  4. package/dinou/core/css-require-hook.js +64 -0
  5. package/dinou/core/generating-isg.js +2 -3
  6. package/dinou/core/get-error-jsx.js +1 -3
  7. package/dinou/core/get-file-path-and-dynamic-params.js +0 -1
  8. package/dinou/core/get-jsx.js +1 -3
  9. package/dinou/core/get-ssg-jsx-or-jsx.js +2 -2
  10. package/dinou/core/render-app-to-html.js +1 -5
  11. package/dinou/core/render-html.js +24 -29
  12. package/dinou/core/server-function-proxy-webpack.js +2 -3
  13. package/dinou/core/server.js +21 -68
  14. package/dinou/esbuild/helpers-esbuild/get-config-esbuild-prod.mjs +0 -1
  15. package/dinou/esbuild/helpers-esbuild/get-config-esbuild.mjs +0 -1
  16. package/dinou/esbuild/helpers-esbuild/get-esbuild-entries.mjs +8 -8
  17. package/dinou/esbuild/helpers-esbuild/write.mjs +6 -6
  18. package/dinou/esbuild/plugins-esbuild/assets-plugin.mjs +17 -17
  19. package/dinou/esbuild/plugins-esbuild/babel-react-compiler-plugin.mjs +11 -11
  20. package/dinou/esbuild/plugins-esbuild/server-functions-plugin.mjs +5 -5
  21. package/dinou/esbuild/plugins-esbuild/stable-chunk-names-and-maps-plugin.mjs +12 -12
  22. package/dinou/esbuild/plugins-postcss/postcss-extract-plugin.js +3 -3
  23. package/dinou/esbuild/react-refresh/esm-hmr-plugin.mjs +12 -39
  24. package/dinou/esbuild/react-refresh/react-refresh-runtime.mjs +1 -2
  25. package/dinou/package.json +4 -6
  26. package/dinou/rollup/rollup-plugins/rollup-plugin-react-client-manifest.js +4 -4
  27. package/dinou/rollup/rollup-plugins/rollup-plugin-server-functions.js +5 -5
  28. package/dinou/rollup/rollup.config.js +30 -58
  29. package/dinou/webpack/helpers/get-webpack-entries.js +7 -31
  30. package/dinou/webpack/loaders/server-functions-loader.js +4 -5
  31. package/dinou/webpack/plugins/manifest-generator-plugin.js +6 -6
  32. package/dinou/webpack/plugins/server-functions-plugin.js +7 -12
  33. package/dinou/webpack/webpack.config.js +21 -36
  34. package/package.json +3 -5
@@ -6,7 +6,6 @@ const CopyWebpackPlugin = require("copy-webpack-plugin");
6
6
  const MiniCssExtractPlugin = require("mini-css-extract-plugin");
7
7
  const createScopedName = require("../core/createScopedName");
8
8
  const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
9
- // const ReactRefreshWebpackPlugin = require("@pmmmwh/react-refresh-webpack-plugin");
10
9
  const manifestGeneratorPlugin = require("./plugins/manifest-generator-plugin");
11
10
  const ServerFunctionsPlugin = require("./plugins/server-functions-plugin");
12
11
  const webpack = require("webpack");
@@ -101,21 +100,12 @@ module.exports = async () => {
101
100
  environment: {
102
101
  module: true,
103
102
  },
104
- // module: true,
105
103
  chunkFormat: "module", // Ensures non-entry chunks (like serverFunctionProxy) output as ESM
106
- // // Optional: If webpack renames to .mjs, force .js
107
- // chunkFilename: "[name]-[contenthash].js",
108
104
  },
109
105
  module: {
110
- // noParse: [/[\\/]dist3[\\/]/, /[\\/]public[\\/]/],
111
106
  rules: [
112
107
  {
113
108
  test: /\.[jt]sx?$/,
114
- // include: [
115
- // path.resolve(process.cwd(), "src"),
116
- // isEjected && path.resolve(process.cwd(), "dinou"),
117
- // path.resolve(__dirname, "../core"),
118
- // ].filter(Boolean),
119
109
  exclude: [/node_modules\/(?!dinou)/, ...outputDirs],
120
110
  use: [
121
111
  {
@@ -128,7 +118,6 @@ module.exports = async () => {
128
118
  plugins: [
129
119
  "babel-plugin-react-compiler",
130
120
  "@babel/plugin-syntax-import-meta",
131
- // isDevelopment && require.resolve("react-refresh/babel"),
132
121
  ].filter(Boolean),
133
122
  },
134
123
  },
@@ -202,7 +191,6 @@ module.exports = async () => {
202
191
  ],
203
192
  },
204
193
  plugins: [
205
- // isDevelopment && new ReactRefreshWebpackPlugin({ overlay: false }),
206
194
  new ReactServerWebpackPlugin({ isServer: false }),
207
195
  new CopyWebpackPlugin({
208
196
  patterns: [
@@ -241,16 +229,13 @@ module.exports = async () => {
241
229
  },
242
230
  plugins: configFile
243
231
  ? [
244
- new TsconfigPathsPlugin({
245
- configFile,
246
- extensions: [".js", ".jsx", ".ts", ".tsx"],
247
- }),
248
- ]
232
+ new TsconfigPathsPlugin({
233
+ configFile,
234
+ extensions: [".js", ".jsx", ".ts", ".tsx"],
235
+ }),
236
+ ]
249
237
  : [],
250
238
  },
251
- // externals: {
252
- // dinou: "dinou",
253
- // },
254
239
  optimization: {
255
240
  // 2. RUNTIME CHUNK: Vital for sharing module state between entry points
256
241
  runtimeChunk: "single",
@@ -294,23 +279,23 @@ module.exports = async () => {
294
279
  },
295
280
  ...(isDevelopment
296
281
  ? {
297
- devServer: {
298
- port: 3001,
299
- hot: false,
300
- devMiddleware: {
301
- index: false,
302
- writeToDisk: true,
303
- },
304
- proxy: [
305
- {
306
- context: () => true,
307
- target: "http://localhost:3000",
308
- changeOrigin: true,
309
- },
310
- ],
311
- client: false,
282
+ devServer: {
283
+ port: 3001,
284
+ hot: false,
285
+ devMiddleware: {
286
+ index: false,
287
+ writeToDisk: true,
312
288
  },
313
- }
289
+ proxy: [
290
+ {
291
+ context: () => true,
292
+ target: "http://localhost:3000",
293
+ changeOrigin: true,
294
+ },
295
+ ],
296
+ client: false,
297
+ },
298
+ }
314
299
  : {}),
315
300
  };
316
301
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dinou",
3
- "version": "4.0.7",
3
+ "version": "4.0.9",
4
4
  "description": "Full-Stack React 19 framework with React Server Components, Server Functions, and Streaming SSR.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -47,7 +47,6 @@
47
47
  "@babel/register": "^7.27.1",
48
48
  "@babel/traverse": "^7.28.3",
49
49
  "@esbuild-plugins/tsconfig-paths": "^0.1.2",
50
- "@pmmmwh/react-refresh-webpack-plugin": "^0.6.2",
51
50
  "@roggc/react-server-dom-esm": "^0.0.0-b061b597-20251212",
52
51
  "@rollup/plugin-babel": "^6.0.4",
53
52
  "@rollup/plugin-commonjs": "^28.0.6",
@@ -61,12 +60,11 @@
61
60
  "babel-plugin-react-compiler": "^1.0.0",
62
61
  "chokidar": "^4.0.3",
63
62
  "commander": "^14.0.0",
64
- "concurrently": "^9.2.0",
63
+ "concurrently": "^10.0.3",
65
64
  "cookie-parser": "^1.4.7",
66
- "copy-webpack-plugin": "^13.0.1",
65
+ "copy-webpack-plugin": "^14.0.0",
67
66
  "cross-env": "^7.0.3",
68
67
  "css-loader": "^7.1.2",
69
- "css-modules-require-hook": "^4.2.3",
70
68
  "dotenv": "^16.5.0",
71
69
  "esbuild": "^0.27.0",
72
70
  "esbuild-copy-static-files": "^0.1.0",