From c62592bf57680712e5126602b5048980ddd1a730 Mon Sep 17 00:00:00 2001 From: Arnab Sen <arnabsen1729@gmail.com> Date: Fri, 11 Mar 2022 20:05:28 +0530 Subject: [PATCH] Remove stylesheets from html and include in js The stylesheets that were linked in the index.html were redundant, as they were already bundled by the webpack. The style.css was again imported in the components/app.jsx. Now, it is placed in the index.js in a order that style.css overrides the other stylesheets. --- src/components/app.jsx | 1 - src/index.html | 13 ------------- src/index.js | 1 + 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/components/app.jsx b/src/components/app.jsx index 0d4599c..ff86dd2 100644 --- a/src/components/app.jsx +++ b/src/components/app.jsx @@ -66,7 +66,6 @@ import { SHOW_KEYBOARD_SHORTCUTS_EVENT } from '../commands'; import { commandPaletteService } from '../commandPaletteService'; -import './../style.css'; import { I18nProvider } from '@lingui/react'; diff --git a/src/index.html b/src/index.html index e39d1f3..0d955a3 100644 --- a/src/index.html +++ b/src/index.html @@ -35,25 +35,12 @@ } </style> - <!-- build:css vendor.css --> - <link rel="stylesheet" href="lib/codemirror/lib/codemirror.css" /> - <link rel="stylesheet" href="lib/codemirror/addon/hint/show-hint.css" /> - <link rel="stylesheet" href="lib/codemirror/addon/fold/foldgutter.css" /> - <link rel="stylesheet" href="lib/codemirror/addon/dialog/dialog.css" /> - <link rel="stylesheet" href="lib/hint.min.css" /> - <link rel="stylesheet" href="lib/inlet.css" /> - <!-- endbuild --> - <link rel="stylesheet" id="editorThemeLinkTag" href="lib/codemirror/theme/monokai.css" /> - <!-- build:css style.css --> - <link rel="stylesheet" href="style.css" /> - <!-- endbuild --> - <style id="fontStyleTemplate" type="template"> @font-face { font-family: 'fontname'; diff --git a/src/index.js b/src/index.js index 7e9bd88..9262bd4 100644 --- a/src/index.js +++ b/src/index.js @@ -6,5 +6,6 @@ import './lib/codemirror/addon/fold/foldgutter.css'; import './lib/codemirror/addon/dialog/dialog.css'; import './lib/hint.min.css'; import './lib/inlet.css'; +import './style.css'; export default App;