feat: disable webpack

This commit is contained in:
fly6516 2024-12-30 16:10:33 +08:00
parent 46493cf1b4
commit d3811fb363

View File

@ -3,27 +3,27 @@
import { useState } from 'react';
import { runCode } from '@/actions'; // 导入 Server Action
import './styles.css'; // 引入样式
const root = document.getElementById('root');
if (root) {
root.innerHTML = 'Hello, world!';
}
/// <reference types="webpack-env" />
if (module.hot) {
module.hot.accept(() => {
console.log('HMR is working!');
});
}
// 启用 HMR
if (module.hot) {
module.hot.accept('./styles.css', () => {
console.log('CSS updated!');
});
}
// import './styles.css'; // 引入样式
//
// const root = document.getElementById('root');
// if (root) {
// root.innerHTML = 'Hello, world!';
// }
//
// /// <reference types="webpack-env" />
//
// if (module.hot) {
// module.hot.accept(() => {
// console.log('HMR is working!');
// });
// }
//
// // 启用 HMR
// if (module.hot) {
// module.hot.accept('./styles.css', () => {
// console.log('CSS updated!');
// });
// }
const CodeRunner = () => {