dinou 3.0.0 → 3.0.1
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.
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [3.0.1]
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- esbuild doesn't give error when 'favicons' folder doesn't exist in root directory.
|
|
13
|
+
|
|
8
14
|
## [3.0.0]
|
|
9
15
|
|
|
10
16
|
### Added
|
|
@@ -6,6 +6,7 @@ import assetsPlugin from "../plugins-esbuild/assets-plugin.mjs";
|
|
|
6
6
|
import copyStaticFiles from "esbuild-copy-static-files";
|
|
7
7
|
import manifestGeneratorPlugin from "../plugins-esbuild/manifest-generator-plugin.mjs";
|
|
8
8
|
import writePlugin from "../plugins-esbuild/write-plugin.mjs";
|
|
9
|
+
import { existsSync } from "node:fs";
|
|
9
10
|
|
|
10
11
|
const manifestData = {};
|
|
11
12
|
|
|
@@ -14,6 +15,29 @@ export default function getConfigEsbuildProd({
|
|
|
14
15
|
outdir = "dist3",
|
|
15
16
|
manifest = {},
|
|
16
17
|
}) {
|
|
18
|
+
let plugins = [
|
|
19
|
+
TsconfigPathsPlugin({}),
|
|
20
|
+
cssProcessorPlugin({ outdir }),
|
|
21
|
+
reactClientManifestPlugin({
|
|
22
|
+
manifest,
|
|
23
|
+
manifestPath: `${outdir}/react-client-manifest.json`,
|
|
24
|
+
}),
|
|
25
|
+
assetsPlugin(),
|
|
26
|
+
manifestGeneratorPlugin(manifestData),
|
|
27
|
+
serverFunctionsPlugin(manifestData),
|
|
28
|
+
writePlugin(),
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
if (existsSync("favicons")) {
|
|
32
|
+
plugins = [
|
|
33
|
+
copyStaticFiles({
|
|
34
|
+
src: "favicons",
|
|
35
|
+
dest: outdir,
|
|
36
|
+
}),
|
|
37
|
+
...plugins,
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
|
|
17
41
|
return {
|
|
18
42
|
entryPoints,
|
|
19
43
|
outdir,
|
|
@@ -36,21 +60,6 @@ export default function getConfigEsbuildProd({
|
|
|
36
60
|
"/__hmr_client__.js",
|
|
37
61
|
"/react-refresh-entry.js",
|
|
38
62
|
],
|
|
39
|
-
plugins
|
|
40
|
-
copyStaticFiles({
|
|
41
|
-
src: "favicons",
|
|
42
|
-
dest: outdir,
|
|
43
|
-
}),
|
|
44
|
-
TsconfigPathsPlugin({}),
|
|
45
|
-
cssProcessorPlugin({ outdir }),
|
|
46
|
-
reactClientManifestPlugin({
|
|
47
|
-
manifest,
|
|
48
|
-
manifestPath: `${outdir}/react-client-manifest.json`,
|
|
49
|
-
}),
|
|
50
|
-
assetsPlugin(),
|
|
51
|
-
manifestGeneratorPlugin(manifestData),
|
|
52
|
-
serverFunctionsPlugin(manifestData),
|
|
53
|
-
writePlugin(),
|
|
54
|
-
],
|
|
63
|
+
plugins,
|
|
55
64
|
};
|
|
56
65
|
}
|
|
@@ -7,6 +7,7 @@ import stableChunkNamesAndMapsPlugin from "../plugins-esbuild/stable-chunk-names
|
|
|
7
7
|
import assetsPlugin from "../plugins-esbuild/assets-plugin.mjs";
|
|
8
8
|
import skipMissingEntryPointsPlugin from "../plugins-esbuild/skip-missing-entry-points-plugin.mjs";
|
|
9
9
|
import copyStaticFiles from "esbuild-copy-static-files";
|
|
10
|
+
import { existsSync } from "node:fs";
|
|
10
11
|
|
|
11
12
|
export default function getConfigEsbuild({
|
|
12
13
|
entryPoints,
|
|
@@ -15,6 +16,27 @@ export default function getConfigEsbuild({
|
|
|
15
16
|
changedIds,
|
|
16
17
|
hmrEngine,
|
|
17
18
|
}) {
|
|
19
|
+
let plugins = [
|
|
20
|
+
skipMissingEntryPointsPlugin(),
|
|
21
|
+
TsconfigPathsPlugin({}),
|
|
22
|
+
cssProcessorPlugin(),
|
|
23
|
+
reactClientManifestPlugin({ manifest }),
|
|
24
|
+
assetsPlugin(),
|
|
25
|
+
stableChunkNamesAndMapsPlugin(),
|
|
26
|
+
serverFunctionsPlugin(),
|
|
27
|
+
esmHmrPlugin({ entryName: "main", changedIds, hmrEngine }),
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
if (existsSync("favicons")) {
|
|
31
|
+
plugins = [
|
|
32
|
+
copyStaticFiles({
|
|
33
|
+
src: "favicons",
|
|
34
|
+
dest: outdir,
|
|
35
|
+
}),
|
|
36
|
+
...plugins,
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
|
|
18
40
|
return {
|
|
19
41
|
entryPoints,
|
|
20
42
|
outdir,
|
|
@@ -37,19 +59,6 @@ export default function getConfigEsbuild({
|
|
|
37
59
|
"/__hmr_client__.js",
|
|
38
60
|
"/react-refresh-entry.js",
|
|
39
61
|
],
|
|
40
|
-
plugins
|
|
41
|
-
copyStaticFiles({
|
|
42
|
-
src: "favicons",
|
|
43
|
-
dest: outdir,
|
|
44
|
-
}),
|
|
45
|
-
skipMissingEntryPointsPlugin(),
|
|
46
|
-
TsconfigPathsPlugin({}),
|
|
47
|
-
cssProcessorPlugin(),
|
|
48
|
-
reactClientManifestPlugin({ manifest }),
|
|
49
|
-
assetsPlugin(),
|
|
50
|
-
stableChunkNamesAndMapsPlugin(),
|
|
51
|
-
serverFunctionsPlugin(),
|
|
52
|
-
esmHmrPlugin({ entryName: "main", changedIds, hmrEngine }),
|
|
53
|
-
],
|
|
62
|
+
plugins,
|
|
54
63
|
};
|
|
55
64
|
}
|