@bigbinary/neeto-commons-frontend 4.13.12 → 4.13.14
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/configs/esbuild/index.js
CHANGED
|
@@ -34,6 +34,7 @@ dotenv.config({ path: isProduction ? ".env" : ".env.development" });
|
|
|
34
34
|
const config = {
|
|
35
35
|
entryPoints: {
|
|
36
36
|
application: entryPoint("app/javascript/packs/application.js"),
|
|
37
|
+
error: entryPoint("app/javascript/packs/error.js"),
|
|
37
38
|
},
|
|
38
39
|
publicPath: `${assetHost ?? ""}/assets`,
|
|
39
40
|
bundle: true,
|
package/configs/vite/index.js
CHANGED
|
@@ -3,6 +3,7 @@ const { default: viteYaml } = require("@modyfi/vite-plugin-yaml");
|
|
|
3
3
|
const { default: react } = require("@vitejs/plugin-react");
|
|
4
4
|
const dotenv = require("dotenv");
|
|
5
5
|
|
|
6
|
+
const { nanoDevelopmentPlugin } = require("./plugins/nanoDevelopment.js");
|
|
6
7
|
const { prevalPlugin } = require("./plugins/preval.js");
|
|
7
8
|
const { reactGiphyPlugin } = require("./plugins/reactGiphy.js");
|
|
8
9
|
const svgr = require("./plugins/svgr.js");
|
|
@@ -11,7 +12,6 @@ const { virtualizedPlugin } = require("./plugins/virtualized.js");
|
|
|
11
12
|
const postCssConfig = require("../../../../../postcss.config.js");
|
|
12
13
|
const { VITE_BABEL_CONFIG } = require("../esbuild/constants.js");
|
|
13
14
|
const { config: esbuildConfig } = require("../esbuild/index.js");
|
|
14
|
-
const { entryPoint } = require("../esbuild/utils.js");
|
|
15
15
|
|
|
16
16
|
dotenv.config({ path: ".env.development" });
|
|
17
17
|
|
|
@@ -27,6 +27,7 @@ const config = {
|
|
|
27
27
|
reactGiphyPlugin(),
|
|
28
28
|
prevalPlugin(),
|
|
29
29
|
viteYaml(),
|
|
30
|
+
nanoDevelopmentPlugin(),
|
|
30
31
|
],
|
|
31
32
|
resolve: { extensions: esbuildConfig.resolveExtensions },
|
|
32
33
|
server: { port, origin: `http://localhost:${port}` },
|
|
@@ -34,9 +35,7 @@ const config = {
|
|
|
34
35
|
manifest: true,
|
|
35
36
|
sourcemap: true,
|
|
36
37
|
cssCodeSplit: false,
|
|
37
|
-
rollupOptions: {
|
|
38
|
-
input: { application: entryPoint("app/javascript/packs/application.js") },
|
|
39
|
-
},
|
|
38
|
+
rollupOptions: { input: esbuildConfig.entryPoints },
|
|
40
39
|
},
|
|
41
40
|
define: { ...esbuildConfig.define, global: "{}" },
|
|
42
41
|
root: "app/javascript/packs",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* eslint-disable @bigbinary/neeto/no-dangling-constants */
|
|
2
|
+
|
|
3
|
+
const path = require("path");
|
|
4
|
+
|
|
5
|
+
const { watch } = require("chokidar");
|
|
6
|
+
|
|
7
|
+
const nanoDevelopmentPlugin = () => ({
|
|
8
|
+
name: "vite-plugin-nano-development",
|
|
9
|
+
configureServer: server => {
|
|
10
|
+
const bigBinaryPackages = path.resolve(
|
|
11
|
+
process.cwd(),
|
|
12
|
+
"node_modules",
|
|
13
|
+
"@bigbinary"
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
watch(bigBinaryPackages, { ignoreInitial: true })
|
|
17
|
+
.on("all", async event => {
|
|
18
|
+
if (event === "change" || event === "add") {
|
|
19
|
+
await server.restart(true);
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
.on("error", error =>
|
|
23
|
+
/* eslint-disable no-console */
|
|
24
|
+
console.log(`[nano-development-plugin] watcher error: ${error}`)
|
|
25
|
+
);
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
module.exports = { nanoDevelopmentPlugin };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.14",
|
|
4
4
|
"description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|