├── .github └── workflows │ └── release.yaml ├── .gitignore ├── README.md ├── manifests └── install.yaml └── ui ├── .gitignore ├── README.md ├── package.json ├── src ├── dark.css ├── index.tsx └── tsconfig.json ├── webpack.config.js └── yarn.lock /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | tag: 7 | description: "Git tag to build release from" 8 | 9 | jobs: 10 | build-ui: 11 | name: Build UI Assets 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v2 16 | 17 | - name: Install UI dependencies 18 | run: yarn --cwd ui install 19 | 20 | - name: Build UI asset 21 | run: yarn --cwd ui build 22 | 23 | - name: Draft release 24 | uses: softprops/action-gh-release@v1 25 | with: 26 | tag_name: ${{ github.event.inputs.tag }} 27 | draft: true 28 | files: | 29 | ui/dist/extension.tar 30 | env: 31 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rollout Extension 2 | 3 | The project introduces the Argo Rollout dashboard into the Argo CD Web UI. 4 | 5 | ![image](https://user-images.githubusercontent.com/426437/136460261-00d3dc31-ad20-4044-a7be-091803b8678f.png) 6 | 7 | ## Install UI extension 8 | 9 | To install the extension use the [argocd-extension-installer](https://github.com/argoproj-labs/argocd-extension-installer) init container which runs during the startup of the argocd server. 10 | The init container downloads and extracts the JS file to `/tmp/extensions`. The argocd interface mounts the external JS file within the rollout resource. 11 | 12 | 13 | ### Kustomize Patch 14 | 15 | ```yaml 16 | apiVersion: apps/v1 17 | kind: Deployment 18 | metadata: 19 | name: argocd-server 20 | spec: 21 | template: 22 | spec: 23 | initContainers: 24 | - name: rollout-extension 25 | image: quay.io/argoprojlabs/argocd-extension-installer:v0.0.1 26 | env: 27 | - name: EXTENSION_URL 28 | value: https://github.com/argoproj-labs/rollout-extension/releases/download/v0.3.4/extension.tar 29 | volumeMounts: 30 | - name: extensions 31 | mountPath: /tmp/extensions/ 32 | securityContext: 33 | runAsUser: 1000 34 | allowPrivilegeEscalation: false 35 | containers: 36 | - name: argocd-server 37 | volumeMounts: 38 | - name: extensions 39 | mountPath: /tmp/extensions/ 40 | volumes: 41 | - name: extensions 42 | emptyDir: {} 43 | ``` 44 | 45 | ### Helm Values 46 | 47 | #### Using `server.extensions` 48 | 49 | ```yaml 50 | server: 51 | extensions: 52 | enabled: true 53 | extensionList: 54 | - name: rollout-extension 55 | env: 56 | - name: EXTENSION_URL 57 | value: https://github.com/argoproj-labs/rollout-extension/releases/download/v0.3.4/extension.tar 58 | ``` 59 | 60 | #### Using `server.initContainers`, `server.volumeMounts`, and `server.volumes` directly 61 | kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/rollout.yaml 62 | kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/service.yaml 63 | 64 | ```yaml 65 | server: 66 | initContainers: 67 | - name: rollout-extension 68 | image: quay.io/argoprojlabs/argocd-extension-installer:v0.0.1 69 | env: 70 | - name: EXTENSION_URL 71 | value: https://github.com/argoproj-labs/rollout-extension/releases/download/v0.3.4/extension.tar 72 | volumeMounts: 73 | - name: extensions 74 | mountPath: /tmp/extensions/ 75 | securityContext: 76 | runAsUser: 1000 77 | allowPrivilegeEscalation: false 78 | volumeMounts: 79 | - name: extensions 80 | mountPath: /tmp/extensions/ 81 | volumes: 82 | - name: extensions 83 | emptyDir: {} 84 | ``` 85 | -------------------------------------------------------------------------------- /manifests/install.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: argoproj.io/v1alpha1 2 | kind: ArgoCDExtension 3 | metadata: 4 | name: argo-rollouts 5 | finalizers: 6 | - extensions-finalizer.argocd.argoproj.io 7 | spec: 8 | sources: 9 | - web: 10 | url: https://github.com/argoproj-labs/rollout-extension/releases/download/v0.3.4/extension.tar 11 | -------------------------------------------------------------------------------- /ui/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | dist 4 | 5 | # dependencies 6 | /node_modules 7 | /.pnp 8 | .pnp.js 9 | 10 | # testing 11 | /coverage 12 | 13 | # production 14 | /build 15 | /ui/dist 16 | 17 | # misc 18 | .DS_Store 19 | .env.local 20 | .env.development.local 21 | .env.test.local 22 | .env.production.local 23 | 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | -------------------------------------------------------------------------------- /ui/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `yarn start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 13 | 14 | The page will reload if you make edits.\ 15 | You will also see any lint errors in the console. 16 | 17 | ### `yarn test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `yarn build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `yarn eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 35 | 36 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 39 | 40 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `yarn build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ui", 3 | "version": "0.1.0", 4 | "private": "false", 5 | "dependencies": { 6 | "@fortawesome/fontawesome-svg-core": "^6.4.0", 7 | "@fortawesome/free-solid-svg-icons": "^6.4.0", 8 | "@fortawesome/react-fontawesome": "^0.2.0", 9 | "argo-rollouts": "git+https://github.com/argoproj/argo-rollouts.git#a4d50d8e65d5fa33a6e7f33f43be9a3df83b06f7", 10 | "argo-ui": "git+https://github.com/argoproj/argo-ui.git#5ff344ac9692c14dd108468bd3c020c3c75181cb", 11 | "classnames": "2.2.6", 12 | "json-loader": "^0.5.7", 13 | "axios": "^1.6.2", 14 | "recharts": "^2.9.0", 15 | "null-loader": "^4.0.1", 16 | "react": "^16.9.3", 17 | "react-dom": "^16.9.3", 18 | "react-helmet": "^6.1.0", 19 | "react-router-dom": "5.2.0", 20 | "react-scripts": "4.0.3", 21 | "ts-loader": "^8.2.0", 22 | "typescript": "^4.9.5", 23 | "web-vitals": "^1.0.1", 24 | "isomorphic-fetch": "^3.0.0" 25 | }, 26 | "peerDeependencies": { 27 | "argo-ui": "git+https://github.com/argoproj/argo-ui.git#5ff344ac9692c14dd108468bd3c020c3c75181cb", 28 | "@types/react": "^16.9.3", 29 | "react": "^16.9.3" 30 | }, 31 | "scripts": { 32 | "start": "NODE_OPTIONS=--openssl-legacy-provider webpack --config ./webpack.config.js --watch", 33 | "build": "NODE_OPTIONS=--openssl-legacy-provider webpack --config ./webpack.config.js && tar -C dist -cvf dist/extension.tar resources" 34 | }, 35 | "eslintConfig": { 36 | "extends": [ 37 | "react-app" 38 | ] 39 | }, 40 | "browserslist": { 41 | "production": [ 42 | ">0.2%", 43 | "not dead", 44 | "not op_mini all" 45 | ], 46 | "development": [ 47 | "last 1 chrome version", 48 | "last 1 firefox version", 49 | "last 1 safari version" 50 | ] 51 | }, 52 | "devDependencies": { 53 | "@types/react": "^16.9.3", 54 | "@types/react-dom": "^16.9.3", 55 | "@types/react-helmet": "^6.1.0", 56 | "babel-preset-react": "^6.24.1", 57 | "portable-fetch": "^3.0.0", 58 | "raw-loader": "^4.0.2", 59 | "react-keyhooks": "^0.2.3", 60 | "rxjs": "^7.1.0", 61 | "sass": "^1.34.1", 62 | "ts-loader": "8.2.0", 63 | "webpack-cli": "^4.9.2" 64 | }, 65 | "resolutions": { 66 | "@types/react": "16.9.3" 67 | }, 68 | "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" 69 | } 70 | -------------------------------------------------------------------------------- /ui/src/dark.css: -------------------------------------------------------------------------------- 1 | .theme-dark .revision { 2 | background: #999999; 3 | } 4 | 5 | .theme-dark .info { 6 | background-color: #555555; 7 | } -------------------------------------------------------------------------------- /ui/src/index.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import {RolloutWidget} from 'argo-rollouts/ui/src/app/components/rollout/rollout'; 3 | import {ObjectMeta, TypeMeta} from 'argo-rollouts/ui/src/models/kubernetes'; 4 | import {RolloutAnalysisRunInfo, RolloutReplicaSetInfo, RolloutRolloutInfo} from 'argo-rollouts/ui/src/models/rollout/generated'; 5 | import { default as axios } from 'axios'; 6 | import './dark.css' 7 | 8 | export type State = TypeMeta & {metadata: ObjectMeta} & { 9 | status: any; 10 | spec: any; 11 | }; 12 | 13 | const parseInfoFromResourceNode = (app: any, tree: any, resource: State) => { 14 | const ro: RolloutRolloutInfo = {}; 15 | const {spec, status, metadata} = resource; 16 | ro.objectMeta = metadata as any; 17 | 18 | ro.analysisRuns = parseAnalysisRuns(app, tree, resource); 19 | 20 | ro.replicaSets = parseReplicaSets(tree, resource); 21 | 22 | if (spec.strategy.canary) { 23 | ro.strategy = 'Canary'; 24 | const steps = spec.strategy?.canary?.steps || []; 25 | ro.steps = steps; 26 | 27 | if (steps && status.currentStepIndex !== null && steps.length > 0) { 28 | ro.step = `${status.currentStepIndex}/${steps.length}`; 29 | } 30 | 31 | const {currentStep, currentStepIndex} = parseCurrentCanaryStep(resource); 32 | ro.setWeight = parseCurrentSetWeight(resource, currentStepIndex); 33 | 34 | ro.actualWeight = '0'; 35 | 36 | if (!currentStep) { 37 | ro.actualWeight = '100'; 38 | } else if (status.availableReplicas > 0) { 39 | if (!spec.strategy.canary.trafficRouting) { 40 | for (const rs of ro.replicaSets) { 41 | if (rs.canary) { 42 | ro.actualWeight = `${rs.available / status.availableReplicas}`; 43 | } 44 | } 45 | } else { 46 | ro.actualWeight = ro.setWeight; 47 | } 48 | } 49 | } else { 50 | ro.strategy = 'BlueGreen'; 51 | } 52 | 53 | ro.containers = []; 54 | if (spec.template) { 55 | for (const c of spec.template?.spec?.containers) { 56 | ro.containers.push({name: c.name, image: c.image}); 57 | } 58 | } 59 | 60 | ro.current = status.replicas; 61 | ro.available = status.availableReplicas; 62 | return ro; 63 | }; 64 | 65 | const parseCurrentCanaryStep = (resource: State): {currentStep: any; currentStepIndex: number} => { 66 | const {status, spec} = resource; 67 | const canary = spec.strategy?.canary; 68 | if (!canary || !canary.steps || canary.steps.length === 0) { 69 | return {currentStep: null, currentStepIndex: -1}; 70 | } 71 | let currentStepIndex = 0; 72 | if (status.currentStepIndex) { 73 | currentStepIndex = status.currentStepIndex; 74 | } 75 | if (canary?.steps?.length <= currentStepIndex) { 76 | return {currentStep: null, currentStepIndex}; 77 | } 78 | const currentStep = canary?.steps[currentStepIndex]; 79 | return {currentStep, currentStepIndex}; 80 | }; 81 | 82 | const parseCurrentSetWeight = (resource: State, currentStepIndex: number): string => { 83 | const {status, spec} = resource; 84 | if (status.abort) { 85 | return '0'; 86 | } 87 | 88 | for (let i = currentStepIndex; i >= 0; i--) { 89 | const step = spec.strategy?.canary?.steps[i]; 90 | if (step?.setWeight) { 91 | return step.setWeight; 92 | } 93 | } 94 | return '0'; 95 | }; 96 | 97 | const parseRevision = (node: any) => { 98 | for (const item of node.info || []) { 99 | if (item.name === 'Revision') { 100 | const parts = item.value.split(':') || []; 101 | return parts.length === 2 ? parts[1] : '0'; 102 | } 103 | } 104 | }; 105 | 106 | const parsePodStatus = (pod: any) => { 107 | for (const item of pod.info || []) { 108 | if (item.name === 'Status Reason') { 109 | return item.value; 110 | } 111 | } 112 | }; 113 | 114 | const parsePodReady = (pod: any) => { 115 | for (const item of pod.info || []) { 116 | if (item.name === "Containers") { 117 | return item.value; 118 | } 119 | } 120 | } 121 | const parseAnalysisRuns = (app: any, tree: any, rollout: any): RolloutAnalysisRunInfo[] => { 122 | const [analysisRunResults, setAnalysisRunResults] = React.useState([]); 123 | const [analysisRunNodeIds, setAnalysisRunNodeIds] = React.useState([]); 124 | const [isRefresh, setIsRefresh] = React.useState(false); 125 | 126 | // Get the list of AnalysisRun node IDs whenever the tree or rollout props change 127 | React.useMemo(() => { 128 | const filteredNodes = tree.nodes.filter(node => node.kind === 'AnalysisRun' && node.parentRefs.some(ref => ref.name === rollout.metadata.name)); 129 | const nodeIds = filteredNodes.map(node => node.uid); 130 | 131 | // Check if there are any new AnalysisRun node IDs or if the count has changed from previous node IDs 132 | if (nodeIds.length !== analysisRunNodeIds.length || !analysisRunNodeIds.every((value, index) => value === nodeIds[index])) { 133 | setIsRefresh(true); 134 | } 135 | setAnalysisRunNodeIds(nodeIds); 136 | }, [tree.nodes]); 137 | 138 | const rolloutAnalysisRunInfo = async () => { 139 | const promises: Promise[] = analysisRunNodeIds.map(async nodeId => { 140 | const node: any = tree.nodes.find(node => node.uid === nodeId); 141 | 142 | const state = await getResource(app.metadata.name, app.metadata.namespace, node as any); 143 | return { 144 | objectMeta: { 145 | creationTimestamp: { 146 | seconds: node.createdAt 147 | }, 148 | name: node.name, 149 | namespace: node.namespace, 150 | resourceVersion: node.version, 151 | uid: node.uid 152 | }, 153 | specAndStatus: { 154 | spec: state.spec, 155 | status: state.status || null 156 | }, 157 | revision: parseRevision(node), 158 | status: parseAnalysisRunStatus(node.health.status) 159 | }; 160 | }); 161 | 162 | const newAnalysisRunResults = await Promise.all(promises); 163 | setIsRefresh(false); 164 | setAnalysisRunResults(newAnalysisRunResults); 165 | }; 166 | // Call the API call function only when isRefresh is true and AnalysisRun node IDs exist 167 | React.useEffect(() => { 168 | if (isRefresh && analysisRunNodeIds.length > 0) { 169 | rolloutAnalysisRunInfo(); 170 | } 171 | }, [isRefresh, analysisRunNodeIds]); 172 | 173 | return analysisRunResults; 174 | }; 175 | 176 | const parseAnalysisRunStatus = (status: string): string => { 177 | switch (status) { 178 | case 'Healthy': 179 | return 'Successful'; 180 | case 'Progressing': 181 | return 'Running'; 182 | case 'Degraded': 183 | return 'Error'; 184 | default: 185 | return 'Failure'; 186 | } 187 | }; 188 | 189 | const parseReplicaSets = (tree: any, rollout: any): RolloutReplicaSetInfo[] => { 190 | const allReplicaSets = []; 191 | const allPods = []; 192 | for (const node of tree.nodes) { 193 | if (node.kind === 'ReplicaSet') { 194 | allReplicaSets.push(node); 195 | } else if (node.kind === 'Pod') { 196 | allPods.push(node); 197 | } 198 | } 199 | 200 | const ownedReplicaSets: {[key: string]: any} = {}; 201 | 202 | for (const rs of allReplicaSets) { 203 | for (const parentRef of rs.parentRefs) { 204 | if (parentRef?.kind === 'Rollout' && parentRef?.name === rollout?.metadata?.name) { 205 | const pods = []; 206 | for (const pod of allPods) { 207 | const [parentRef] = pod.parentRefs; 208 | if (parentRef && parentRef.kind === 'ReplicaSet' && parentRef.name === rs.name) { 209 | const ownedPod = { 210 | objectMeta: { 211 | name: pod.name, 212 | uid: pod.uid, 213 | namespace: pod.namespace, 214 | creationTimestamp: pod.creationTimestamp 215 | }, 216 | images: pod.images, 217 | status: parsePodStatus(pod), 218 | revision: parseRevision(rs), 219 | ready: parsePodReady(pod), 220 | canary: true 221 | }; 222 | pods.push(ownedPod); 223 | } 224 | } 225 | ownedReplicaSets[rs?.name] = { 226 | objectMeta: { 227 | name: rs.name, 228 | uid: rs.uid, 229 | namespace: rs.namespace 230 | }, 231 | status: rs?.health.status, 232 | revision: parseRevision(rs), 233 | canary: true 234 | }; 235 | if (pods.length > 0) { 236 | ownedReplicaSets[rs?.name].pods = pods; 237 | } 238 | } 239 | } 240 | } 241 | 242 | return (Object.values(ownedReplicaSets) || []).map(rs => { 243 | return rs; 244 | }); 245 | }; 246 | 247 | const getResource = (name: string | undefined, appNamespace: string | undefined, resource: any): Promise => { 248 | const params = { 249 | name, 250 | appNamespace, 251 | namespace: resource.namespace, 252 | resourceName: resource.name, 253 | version: resource.version, 254 | kind: resource.kind, 255 | group: resource.group || '' 256 | }; 257 | 258 | return axios.get(`/api/v1/applications/${name}/resource`, {params}).then(response => { 259 | const {manifest} = response.data; 260 | return JSON.parse(manifest); 261 | }); 262 | }; 263 | 264 | // tslint:disable-next-line:no-empty-interface 265 | interface ApplicationResourceTree {} 266 | 267 | export const Extension = (props: {application: any; tree: ApplicationResourceTree; resource: State}) => { 268 | const ro = parseInfoFromResourceNode(props.application, props.tree, props.resource); 269 | return ; 270 | }; 271 | 272 | export const component = Extension; 273 | 274 | ((window: any) => { 275 | window?.extensionsAPI?.registerResourceExtension(component, 'argoproj.io', 'Rollout', 'Rollout', {icon: 'fa-sharp fa-light fa-bars-progress fa-lg'}); 276 | })(window); 277 | -------------------------------------------------------------------------------- /ui/src/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "./dist", 4 | "sourceMap": true, 5 | "noImplicitAny": false, 6 | "module": "commonjs", 7 | "target": "es6", 8 | "jsx": "react", 9 | "moduleResolution": "node", 10 | "experimentalDecorators": true, 11 | "noUnusedLocals": true, 12 | "declaration": false, 13 | "esModuleInterop": false, 14 | "allowSyntheticDefaultImports": true, 15 | "resolveJsonModule": true, 16 | "downlevelIteration": true , 17 | "lib": ["es2017", "dom"] 18 | }, 19 | "include": ["./**/*"], 20 | "exclude": ["node_modules"] 21 | } 22 | -------------------------------------------------------------------------------- /ui/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | const extName = "Rollout"; 4 | 5 | const config = { 6 | entry: { 7 | extension: './src/index.tsx', 8 | }, 9 | output: { 10 | filename: `extensions-${extName}.js`, 11 | path: __dirname + `/dist/resources/extension-${extName}.js`, 12 | libraryTarget: "window", 13 | library: ["tmp", "extensions"], 14 | }, 15 | resolve: { 16 | extensions: ['.ts', '.tsx', '.js', '.json', '.ttf'], 17 | }, 18 | externals: { 19 | react: 'React', 20 | }, 21 | module: { 22 | rules: [ 23 | { 24 | test: /\.tsx?$/, 25 | loader: 'ts-loader', 26 | options: { 27 | allowTsInNodeModules: true, 28 | configFile: path.resolve('./src/tsconfig.json') 29 | }, 30 | }, 31 | { 32 | // prevent overriding global page styles 33 | test: path.resolve(__dirname, 'node_modules/argo-ui/src/components/page/page.scss'), 34 | use: 'null-loader', 35 | }, 36 | { 37 | test: /\.scss$/, 38 | use: ['style-loader', 'raw-loader', 'sass-loader'], 39 | }, 40 | { 41 | test: /\.css$/, 42 | use: ['style-loader', 'raw-loader'], 43 | }, 44 | // https://github.com/fkhadra/react-toastify/issues/775#issuecomment-1149569290 45 | { 46 | test: /\.mjs$/, 47 | include: /node_modules/, 48 | type: "javascript/auto" 49 | }, 50 | ], 51 | }, 52 | }; 53 | 54 | module.exports = config; --------------------------------------------------------------------------------