hale-commenting-system 2.2.97 → 3.1.0

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 (37) hide show
  1. package/GITHUB_OAUTH_ENV_TEMPLATE.md +2 -2
  2. package/README.md +10 -1
  3. package/package.json +16 -9
  4. package/scripts/integrate.js +64 -430
  5. package/src/app/commenting-system/components/CommentOverlay.tsx +4 -3
  6. package/src/app/commenting-system/components/CommentPanel.tsx +11 -64
  7. package/src/app/commenting-system/components/FloatingWidget.tsx +105 -39
  8. package/src/app/commenting-system/contexts/CommentContext.tsx +11 -4
  9. package/src/app/commenting-system/types/index.ts +1 -0
  10. package/.claude/settings.local.json +0 -7
  11. package/.editorconfig +0 -17
  12. package/.eslintrc.js +0 -75
  13. package/.prettierignore +0 -1
  14. package/.prettierrc +0 -4
  15. package/src/app/AppLayout/AppLayout.tsx +0 -248
  16. package/src/app/Comments/Comments.tsx +0 -273
  17. package/src/app/Dashboard/Dashboard.tsx +0 -10
  18. package/src/app/NotFound/NotFound.tsx +0 -35
  19. package/src/app/Settings/General/GeneralSettings.tsx +0 -16
  20. package/src/app/Settings/Profile/ProfileSettings.tsx +0 -18
  21. package/src/app/Support/Support.tsx +0 -50
  22. package/src/app/app.css +0 -11
  23. package/src/app/bgimages/Patternfly-Logo.svg +0 -28
  24. package/src/app/index.tsx +0 -22
  25. package/src/app/routes.tsx +0 -81
  26. package/src/app/utils/useDocumentTitle.ts +0 -13
  27. package/src/favicon.png +0 -0
  28. package/src/index.html +0 -18
  29. package/src/index.tsx +0 -25
  30. package/src/test/setup.ts +0 -33
  31. package/src/typings.d.ts +0 -12
  32. package/stylePaths.js +0 -14
  33. package/tsconfig.json +0 -34
  34. package/vitest.config.ts +0 -19
  35. package/webpack.common.js +0 -139
  36. package/webpack.dev.js +0 -318
  37. package/webpack.prod.js +0 -38
@@ -1,28 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="679px" height="158px" viewBox="0 0 679 158" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <title>Patternfly Logo</title>
4
- <defs>
5
- <linearGradient x1="100%" y1="1.31838984e-13%" x2="40.4021492%" y2="59.4473677%" id="linearGradient-1">
6
- <stop stop-color="#FFFFFF" offset="0%"></stop>
7
- <stop stop-color="#FFFFFF" stop-opacity="0.498497596" offset="100%"></stop>
8
- </linearGradient>
9
- </defs>
10
- <g id="PF-HorizontalLogo-Reverse" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
11
- <g id="Group" transform="translate(-0.000000, 0.000000)">
12
- <path d="M61.7658863,0 L157.846154,0 L157.846154,96.0802676 C104.782487,96.0802676 61.7658863,53.0636665 61.7658863,0 L61.7658863,0 L61.7658863,0 Z" id="Rectangle-Copy-15" fill="#FFFFFF" opacity="0.401297433"></path>
13
- <path d="M158,1.84777167 L158,138 C158,149.045695 149.045695,158 138,158 L66.3656919,158 L158,1.84777167 Z M156.152228,3.55271368e-13 L-9.37916411e-13,91.6343081 L-9.37916411e-13,20 C-9.09494702e-13,8.954305 8.954305,3.55271368e-13 20,3.41060513e-13 L156.152228,3.55271368e-13 Z" id="Combined-Shape-Copy-4" fill="url(#linearGradient-1)"></path>
14
- </g>
15
- <g id="PatternFly-Copy-11" transform="translate(206.000000, 45.750000)" fill="#FFFFFF" fill-rule="nonzero">
16
- <path d="M0,65.25 L0,2.25 L33.21,2.25 C37.35,2.25 41.025,3.135 44.235,4.905 C47.445,6.675 49.98,9.09 51.84,12.15 C53.7,15.21 54.63,18.72 54.63,22.68 C54.63,26.46 53.7,29.865 51.84,32.895 C49.98,35.925 47.43,38.31 44.19,40.05 C40.95,41.79 37.29,42.66 33.21,42.66 L15.48,42.66 L15.48,65.25 L0,65.25 Z M15.48,29.88 L31.41,29.88 C33.69,29.88 35.52,29.22 36.9,27.9 C38.28,26.58 38.97,24.87 38.97,22.77 C38.97,20.61 38.28,18.855 36.9,17.505 C35.52,16.155 33.69,15.48 31.41,15.48 L15.48,15.48 L15.48,29.88 Z" id="Shape"></path>
17
- <path d="M77.04,66.06 C73.68,66.06 70.695,65.43 68.085,64.17 C65.475,62.91 63.435,61.17 61.965,58.95 C60.495,56.73 59.76,54.18 59.76,51.3 C59.76,46.74 61.485,43.215 64.935,40.725 C68.385,38.235 73.2,36.99 79.38,36.99 C83.1,36.99 86.7,37.44 90.18,38.34 L90.18,36 C90.18,31.26 87.15,28.89 81.09,28.89 C77.49,28.89 72.69,30.15 66.69,32.67 L61.47,21.96 C69.15,18.48 76.56,16.74 83.7,16.74 C90.3,16.74 95.43,18.315 99.09,21.465 C102.75,24.615 104.58,29.04 104.58,34.74 L104.58,65.25 L90.18,65.25 L90.18,62.37 C88.26,63.69 86.235,64.635 84.105,65.205 C81.975,65.775 79.62,66.06 77.04,66.06 Z M73.62,51.03 C73.62,52.53 74.28,53.7 75.6,54.54 C76.92,55.38 78.75,55.8 81.09,55.8 C84.69,55.8 87.72,55.05 90.18,53.55 L90.18,47.43 C87.42,46.71 84.54,46.35 81.54,46.35 C79.02,46.35 77.07,46.755 75.69,47.565 C74.31,48.375 73.62,49.53 73.62,51.03 Z" id="Shape"></path>
18
- <path d="M137.25,65.88 C125.73,65.88 119.97,60.84 119.97,50.76 L119.97,29.79 L110.34,29.79 L110.34,17.64 L119.97,17.64 L119.97,5.4 L134.55,2.25 L134.55,17.64 L147.87,17.64 L147.87,29.79 L134.55,29.79 L134.55,47.88 C134.55,49.98 135.015,51.465 135.945,52.335 C136.875,53.205 138.51,53.64 140.85,53.64 C143.01,53.64 145.2,53.31 147.42,52.65 L147.42,64.44 C146.1,64.86 144.42,65.205 142.38,65.475 C140.34,65.745 138.63,65.88 137.25,65.88 Z" id="Path"></path>
19
- <path d="M177.57,65.88 C166.05,65.88 160.29,60.84 160.29,50.76 L160.29,29.79 L150.66,29.79 L150.66,17.64 L160.29,17.64 L160.29,5.4 L174.87,2.25 L174.87,17.64 L188.19,17.64 L188.19,29.79 L174.87,29.79 L174.87,47.88 C174.87,49.98 175.335,51.465 176.265,52.335 C177.195,53.205 178.83,53.64 181.17,53.64 C183.33,53.64 185.52,53.31 187.74,52.65 L187.74,64.44 C186.42,64.86 184.74,65.205 182.7,65.475 C180.66,65.745 178.95,65.88 177.57,65.88 Z" id="Path"></path>
20
- <path d="M217.62,66.15 C212.76,66.15 208.365,65.055 204.435,62.865 C200.505,60.675 197.4,57.72 195.12,54 C192.84,50.28 191.7,46.11 191.7,41.49 C191.7,36.87 192.795,32.7 194.985,28.98 C197.175,25.26 200.16,22.305 203.94,20.115 C207.72,17.925 211.92,16.83 216.54,16.83 C221.22,16.83 225.36,17.955 228.96,20.205 C232.56,22.455 235.395,25.53 237.465,29.43 C239.535,33.33 240.57,37.8 240.57,42.84 L240.57,46.44 L206.64,46.44 C207.6,48.66 209.1,50.475 211.14,51.885 C213.18,53.295 215.58,54 218.34,54 C222.42,54 225.6,52.8 227.88,50.4 L237.51,58.95 C234.51,61.47 231.435,63.3 228.285,64.44 C225.135,65.58 221.58,66.15 217.62,66.15 Z M206.37,36.27 L226.26,36.27 C225.48,33.99 224.205,32.16 222.435,30.78 C220.665,29.4 218.61,28.71 216.27,28.71 C213.87,28.71 211.8,29.37 210.06,30.69 C208.32,32.01 207.09,33.87 206.37,36.27 Z" id="Shape"></path>
21
- <path d="M247.41,65.25 L247.41,17.64 L261.99,17.64 L261.99,22.41 C265.23,18.51 269.4,16.56 274.5,16.56 C277.08,16.62 278.91,17.01 279.99,17.73 L279.99,30.42 C277.95,29.46 275.64,28.98 273.06,28.98 C270.78,28.98 268.665,29.505 266.715,30.555 C264.765,31.605 263.19,33.09 261.99,35.01 L261.99,65.25 L247.41,65.25 Z" id="Path"></path>
22
- <path d="M286.29,65.25 L286.29,17.64 L300.87,17.64 L300.87,20.88 C304.47,18.12 308.73,16.74 313.65,16.74 C317.37,16.74 320.655,17.55 323.505,19.17 C326.355,20.79 328.59,23.04 330.21,25.92 C331.83,28.8 332.64,32.13 332.64,35.91 L332.64,65.25 L318.06,65.25 L318.06,37.89 C318.06,35.25 317.28,33.15 315.72,31.59 C314.16,30.03 312.06,29.25 309.42,29.25 C305.76,29.25 302.91,30.51 300.87,33.03 L300.87,65.25 L286.29,65.25 Z" id="Path"></path>
23
- <polygon id="Path" points="342 65.25 342 2.25 392.04 2.25 392.04 15.66 357.48 15.66 357.48 27.45 380.52 27.45 380.52 40.41 357.48 40.41 357.48 65.25"></polygon>
24
- <polygon id="Path" points="399.96 65.25 399.96 2.25 414.54 0 414.54 65.25"></polygon>
25
- <path d="M429.21,84.69 C428.07,84.69 426.96,84.645 425.88,84.555 C424.8,84.465 423.9,84.33 423.18,84.15 L423.18,71.73 C424.38,71.97 425.88,72.09 427.68,72.09 C432.36,72.09 435.51,70.05 437.13,65.97 L437.13,65.88 L418.86,17.64 L434.97,17.64 L445.5,47.61 L457.74,17.64 L473.49,17.64 L452.16,67.68 C450.42,71.82 448.5,75.135 446.4,77.625 C444.3,80.115 441.87,81.915 439.11,83.025 C436.35,84.135 433.05,84.69 429.21,84.69 Z" id="Path"></path>
26
- </g>
27
- </g>
28
- </svg>
package/src/app/index.tsx DELETED
@@ -1,22 +0,0 @@
1
- import * as React from 'react';
2
- import '@patternfly/react-core/dist/styles/base.css';
3
- import { BrowserRouter as Router } from 'react-router-dom';
4
- import { AppLayout } from '@app/AppLayout/AppLayout';
5
- import { AppRoutes } from '@app/routes';
6
- import { CommentProvider } from '@app/commenting-system';
7
- import { GitHubAuthProvider } from '@app/commenting-system';
8
- import '@app/app.css';
9
-
10
- const App: React.FunctionComponent = () => (
11
- <Router>
12
- <GitHubAuthProvider>
13
- <CommentProvider>
14
- <AppLayout>
15
- <AppRoutes />
16
- </AppLayout>
17
- </CommentProvider>
18
- </GitHubAuthProvider>
19
- </Router>
20
- );
21
-
22
- export default App;
@@ -1,81 +0,0 @@
1
- import * as React from 'react';
2
- import { Route, Routes } from 'react-router-dom';
3
- import { Dashboard } from '@app/Dashboard/Dashboard';
4
- import { Support } from '@app/Support/Support';
5
- import { GeneralSettings } from '@app/Settings/General/GeneralSettings';
6
- import { ProfileSettings } from '@app/Settings/Profile/ProfileSettings';
7
- import { NotFound } from '@app/NotFound/NotFound';
8
-
9
- export interface IAppRoute {
10
- label?: string; // Excluding the label will exclude the route from the nav sidebar in AppLayout
11
- /* eslint-disable @typescript-eslint/no-explicit-any */
12
- element: React.ReactElement;
13
- /* eslint-enable @typescript-eslint/no-explicit-any */
14
- exact?: boolean;
15
- path: string;
16
- title: string;
17
- routes?: undefined;
18
- }
19
-
20
- export interface IAppRouteGroup {
21
- label: string;
22
- routes: IAppRoute[];
23
- }
24
-
25
- export type AppRouteConfig = IAppRoute | IAppRouteGroup;
26
-
27
- const routes: AppRouteConfig[] = [
28
- {
29
- element: <Dashboard />,
30
- exact: true,
31
- label: 'Dashboard',
32
- path: '/',
33
- title: 'Hale Commenting System | Main Dashboard',
34
- },
35
- {
36
- element: <Support />,
37
- exact: true,
38
- label: 'Support',
39
- path: '/support',
40
- title: 'Hale Commenting System | Support Page',
41
- },
42
- {
43
- label: 'Settings',
44
- routes: [
45
- {
46
- element: <GeneralSettings />,
47
- exact: true,
48
- label: 'General',
49
- path: '/settings/general',
50
- title: 'Hale Commenting System | General Settings',
51
- },
52
- {
53
- element: <ProfileSettings />,
54
- exact: true,
55
- label: 'Profile',
56
- path: '/settings/profile',
57
- title: 'Hale Commenting System | Profile Settings',
58
- },
59
- ],
60
- },
61
- {
62
- label: 'Comments',
63
- routes: [],
64
- },
65
- ];
66
-
67
- const flattenedRoutes: IAppRoute[] = routes.reduce(
68
- (flattened, route) => [...flattened, ...(route.routes ? route.routes : [route])],
69
- [] as IAppRoute[],
70
- );
71
-
72
- const AppRoutes = (): React.ReactElement => (
73
- <Routes>
74
- {flattenedRoutes.map(({ path, element }, idx) => (
75
- <Route path={path} element={element} key={idx} />
76
- ))}
77
- <Route element={<NotFound />} />
78
- </Routes>
79
- );
80
-
81
- export { AppRoutes, routes };
@@ -1,13 +0,0 @@
1
- import * as React from 'react';
2
-
3
- // a custom hook for setting the page title
4
- export function useDocumentTitle(title: string) {
5
- React.useEffect(() => {
6
- const originalTitle = document.title;
7
- document.title = title;
8
-
9
- return () => {
10
- document.title = originalTitle;
11
- };
12
- }, [title]);
13
- }
package/src/favicon.png DELETED
Binary file
package/src/index.html DELETED
@@ -1,18 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en-US">
3
-
4
- <head>
5
- <meta charset="utf-8">
6
- <title>Hale Commenting System</title>
7
- <meta id="appName" name="application-name" content="Hale Commenting System">
8
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
- <link rel="icon" type="image/svg+xml" href="/images/favicon.png">
10
- <base href="/">
11
- </head>
12
-
13
- <body>
14
- <noscript>Enabling JavaScript is required to run this app.</noscript>
15
- <div id="root"></div>
16
- </body>
17
-
18
- </html>
package/src/index.tsx DELETED
@@ -1,25 +0,0 @@
1
- import React from "react";
2
- import ReactDOM from "react-dom/client";
3
- import App from '@app/index';
4
-
5
- if (process.env.NODE_ENV !== "production") {
6
- const config = {
7
- rules: [
8
- {
9
- id: 'color-contrast',
10
- enabled: false
11
- }
12
- ]
13
- };
14
- // eslint-disable-next-line @typescript-eslint/no-require-imports
15
- const axe = require("react-axe");
16
- axe(React, ReactDOM, 1000, config);
17
- }
18
-
19
- const root = ReactDOM.createRoot(document.getElementById("root") as Element);
20
-
21
- root.render(
22
- <React.StrictMode>
23
- <App />
24
- </React.StrictMode>
25
- )
package/src/test/setup.ts DELETED
@@ -1,33 +0,0 @@
1
- import '@testing-library/jest-dom';
2
- import { vi } from 'vitest';
3
-
4
- // Mock CSS imports
5
- Object.defineProperty(window, 'matchMedia', {
6
- writable: true,
7
- value: vi.fn().mockImplementation((query) => ({
8
- matches: false,
9
- media: query,
10
- onchange: null,
11
- addListener: vi.fn(), // deprecated
12
- removeListener: vi.fn(), // deprecated
13
- addEventListener: vi.fn(),
14
- removeEventListener: vi.fn(),
15
- dispatchEvent: vi.fn(),
16
- })),
17
- });
18
-
19
- // Mock ResizeObserver
20
- global.ResizeObserver = class ResizeObserver {
21
- observe = vi.fn();
22
- unobserve = vi.fn();
23
- disconnect = vi.fn();
24
- constructor(callback: ResizeObserverCallback) {}
25
- };
26
-
27
- // Mock IntersectionObserver
28
- global.IntersectionObserver = class IntersectionObserver {
29
- observe = vi.fn();
30
- unobserve = vi.fn();
31
- disconnect = vi.fn();
32
- constructor(callback: IntersectionObserverCallback, options?: IntersectionObserverInit) {}
33
- } as any;
package/src/typings.d.ts DELETED
@@ -1,12 +0,0 @@
1
- declare module '*.png';
2
- declare module '*.jpg';
3
- declare module '*.jpeg';
4
- declare module '*.gif';
5
- declare module '*.svg';
6
- declare module '*.css';
7
- declare module '*.wav';
8
- declare module '*.mp3';
9
- declare module '*.m4a';
10
- declare module '*.rdf';
11
- declare module '*.ttl';
12
- declare module '*.pdf';
package/stylePaths.js DELETED
@@ -1,14 +0,0 @@
1
- const path = require('path');
2
- module.exports = {
3
- stylePaths: [
4
- path.resolve(__dirname, 'src'),
5
- path.resolve(__dirname, 'node_modules/patternfly'),
6
- path.resolve(__dirname, 'node_modules/@patternfly/patternfly'),
7
- path.resolve(__dirname, 'node_modules/@patternfly/react-styles/css'),
8
- path.resolve(__dirname, 'node_modules/@patternfly/react-core/dist/styles/base.css'),
9
- path.resolve(__dirname, 'node_modules/@patternfly/react-core/dist/esm/@patternfly/patternfly'),
10
- path.resolve(__dirname, 'node_modules/@patternfly/react-core/node_modules/@patternfly/react-styles/css'),
11
- path.resolve(__dirname, 'node_modules/@patternfly/react-table/node_modules/@patternfly/react-styles/css'),
12
- path.resolve(__dirname, 'node_modules/@patternfly/react-inline-edit-extension/node_modules/@patternfly/react-styles/css')
13
- ]
14
- }
package/tsconfig.json DELETED
@@ -1,34 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "baseUrl": ".",
4
- "rootDir": ".",
5
- "outDir": "dist",
6
- "module": "esnext",
7
- "target": "es5",
8
- "lib": ["es6", "dom"],
9
- "sourceMap": true,
10
- "jsx": "react",
11
- "moduleResolution": "node",
12
- "forceConsistentCasingInFileNames": true,
13
- "noImplicitReturns": true,
14
- "noImplicitThis": true,
15
- "noImplicitAny": false,
16
- "allowJs": true,
17
- "esModuleInterop": true,
18
- "allowSyntheticDefaultImports": true,
19
- "strict": true,
20
- "paths": {
21
- "@app/*": ["src/app/*"],
22
- "@assets/*": ["node_modules/@patternfly/react-core/dist/styles/assets/*"]
23
- },
24
- "importHelpers": true,
25
- "skipLibCheck": true
26
- },
27
- "include": [
28
- "**/*.ts",
29
- "**/*.tsx",
30
- "**/*.jsx",
31
- "**/*.js"
32
- ],
33
- "exclude": ["node_modules"]
34
- }
package/vitest.config.ts DELETED
@@ -1,19 +0,0 @@
1
- /// <reference types="vitest" />
2
- import { defineConfig } from 'vitest/config';
3
- import react from '@vitejs/plugin-react';
4
- import path from 'path';
5
-
6
- export default defineConfig({
7
- plugins: [react()],
8
- test: {
9
- environment: 'jsdom',
10
- setupFiles: ['./src/test/setup.ts'],
11
- globals: true,
12
- css: true,
13
- },
14
- resolve: {
15
- alias: {
16
- '@app': path.resolve(__dirname, './src/app'),
17
- },
18
- },
19
- });
package/webpack.common.js DELETED
@@ -1,139 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-var-requires */
2
-
3
- const path = require('path');
4
- const HtmlWebpackPlugin = require('html-webpack-plugin');
5
- const CopyPlugin = require('copy-webpack-plugin');
6
- const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
7
- const Dotenv = require('dotenv-webpack');
8
- const BG_IMAGES_DIRNAME = 'bgimages';
9
- const ASSET_PATH = process.env.ASSET_PATH || '/';
10
- module.exports = (env) => {
11
- return {
12
- module: {
13
- rules: [
14
- {
15
- test: /\.(tsx|ts|jsx)?$/,
16
- use: [
17
- {
18
- loader: 'ts-loader',
19
- options: {
20
- transpileOnly: true,
21
- experimentalWatchApi: true,
22
- },
23
- },
24
- ],
25
- },
26
- {
27
- test: /\.(svg|ttf|eot|woff|woff2)$/,
28
- type: 'asset/resource',
29
- // only process modules with this loader
30
- // if they live under a 'fonts' or 'pficon' directory
31
- include: [
32
- path.resolve(__dirname, 'node_modules/patternfly/dist/fonts'),
33
- path.resolve(__dirname, 'node_modules/@patternfly/react-core/dist/styles/assets/fonts'),
34
- path.resolve(__dirname, 'node_modules/@patternfly/react-core/dist/styles/assets/pficon'),
35
- path.resolve(__dirname, 'node_modules/@patternfly/patternfly/assets/fonts'),
36
- path.resolve(__dirname, 'node_modules/@patternfly/patternfly/assets/pficon'),
37
- ],
38
- },
39
- {
40
- test: /\.svg$/,
41
- type: 'asset/inline',
42
- include: (input) => input.indexOf('background-filter.svg') > 1,
43
- use: [
44
- {
45
- options: {
46
- limit: 5000,
47
- outputPath: 'svgs',
48
- name: '[name].[ext]',
49
- },
50
- },
51
- ],
52
- },
53
- {
54
- test: /\.svg$/,
55
- // only process SVG modules with this loader if they live under a 'bgimages' directory
56
- // this is primarily useful when applying a CSS background using an SVG
57
- include: (input) => input.indexOf(BG_IMAGES_DIRNAME) > -1,
58
- type: 'asset/inline',
59
- },
60
- {
61
- test: /\.svg$/,
62
- // only process SVG modules with this loader when they don't live under a 'bgimages',
63
- // 'fonts', or 'pficon' directory, those are handled with other loaders
64
- include: (input) =>
65
- input.indexOf(BG_IMAGES_DIRNAME) === -1 &&
66
- input.indexOf('fonts') === -1 &&
67
- input.indexOf('background-filter') === -1 &&
68
- input.indexOf('pficon') === -1,
69
- use: {
70
- loader: 'raw-loader',
71
- options: {},
72
- },
73
- },
74
- {
75
- test: /\.(jpg|jpeg|png|gif)$/i,
76
- include: [
77
- path.resolve(__dirname, 'src'),
78
- path.resolve(__dirname, 'node_modules/patternfly'),
79
- path.resolve(__dirname, 'node_modules/@patternfly/patternfly/assets/images'),
80
- path.resolve(__dirname, 'node_modules/@patternfly/react-styles/css/assets/images'),
81
- path.resolve(__dirname, 'node_modules/@patternfly/react-core/dist/styles/assets/images'),
82
- path.resolve(
83
- __dirname,
84
- 'node_modules/@patternfly/react-core/node_modules/@patternfly/react-styles/css/assets/images'
85
- ),
86
- path.resolve(
87
- __dirname,
88
- 'node_modules/@patternfly/react-table/node_modules/@patternfly/react-styles/css/assets/images'
89
- ),
90
- path.resolve(
91
- __dirname,
92
- 'node_modules/@patternfly/react-inline-edit-extension/node_modules/@patternfly/react-styles/css/assets/images'
93
- ),
94
- ],
95
- type: 'asset/inline',
96
- use: [
97
- {
98
- options: {
99
- limit: 5000,
100
- outputPath: 'images',
101
- name: '[name].[ext]',
102
- },
103
- },
104
- ],
105
- },
106
- ],
107
- },
108
- output: {
109
- filename: '[name].bundle.js',
110
- path: path.resolve(__dirname, 'dist'),
111
- publicPath: ASSET_PATH,
112
- },
113
- plugins: [
114
- new HtmlWebpackPlugin({
115
- template: path.resolve(__dirname, 'src', 'index.html'),
116
- }),
117
- new Dotenv({
118
- // IMPORTANT: do not inline system env vars into the browser bundle.
119
- // Keep `.env` for public/client-side config only (e.g. VITE_GITHUB_CLIENT_ID).
120
- // Server-side secrets should be provided via server runtime env (functions) instead.
121
- systemvars: false,
122
- silent: true,
123
- }),
124
- new CopyPlugin({
125
- patterns: [{ from: './src/favicon.png', to: 'images' }],
126
- }),
127
- ],
128
- resolve: {
129
- extensions: ['.js', '.ts', '.tsx', '.jsx'],
130
- plugins: [
131
- new TsconfigPathsPlugin({
132
- configFile: path.resolve(__dirname, './tsconfig.json'),
133
- }),
134
- ],
135
- symlinks: false,
136
- cacheWithContext: false,
137
- },
138
- };
139
- };