Skip to content

Commit

Permalink
Disable HMR for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Feb 15, 2024
1 parent 4a211e3 commit 5846405
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/app/pages/templates/TemplatesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Copyright (c) Sebastian Stehle. All rights reserved.
*/

import classNames from 'classnames';
import * as React from 'react';
import { useDispatch } from 'react-redux';
import { useBoolean } from '@app/framework';
Expand Down Expand Up @@ -32,7 +33,9 @@ export const TemplatesPage = () => {

return (
<div className='templates'>
<TemplatesList onOpen={setIsOpen.on} />
<div className={classNames({ 'templates-selected': isOpen && !!template })}>
<TemplatesList onOpen={setIsOpen.on} />
</div>

{isOpen &&
<TemplateForm language={language}
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/app/style/_templates.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
&-overview {
max-width: 600px;
}

&-selected {
opacity: .75;
pointer-events: none;
}
}

.preview-container {
Expand Down
9 changes: 9 additions & 0 deletions frontend/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ import mkcert from 'vite-plugin-mkcert';

const dirName = fileURLToPath(new URL('.', import.meta.url));

const fullReloadAlways = {
name: 'full-reload-always',
handleHotUpdate({ server }) {
server.ws.send({ type: 'full-reload' });
return [];
},
};

// https://vitejs.dev/config/
export default defineConfig({
resolve: {
Expand Down Expand Up @@ -50,6 +58,7 @@ export default defineConfig({
include: 'sdk/**/*.tsx',
}),
mkcert(),
fullReloadAlways,
],

test: {
Expand Down

0 comments on commit 5846405

Please sign in to comment.