mirror of
https://github.com/jaronpate/unicord.git
synced 2026-10-18 21:47:40 +00:00
Trying to add monaco
This commit is contained in:
+13
-2
@@ -1,7 +1,18 @@
|
|||||||
import type { NextConfig } from "next";
|
import type { NextConfig } from "next";
|
||||||
|
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
/* config options here */
|
webpack: (config, { isServer }) => {
|
||||||
|
if (!isServer) {
|
||||||
|
config.plugins.push(
|
||||||
|
new MonacoWebpackPlugin({
|
||||||
|
languages: ['typescript', 'javascript'],
|
||||||
|
filename: 'static/[name].worker.js',
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return config;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
Generated
+880
-3
File diff suppressed because it is too large
Load Diff
@@ -9,15 +9,17 @@
|
|||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"monaco-editor": "^0.52.2",
|
||||||
|
"monaco-editor-webpack-plugin": "^7.1.0",
|
||||||
|
"next": "15.1.7",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"react-dom": "^19.0.0",
|
"react-dom": "^19.0.0",
|
||||||
"next": "15.1.7",
|
|
||||||
"react-syntax-highlighter": "^15.4.3"
|
"react-syntax-highlighter": "^15.4.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^5",
|
|
||||||
"@types/node": "^20",
|
"@types/node": "^20",
|
||||||
"@types/react": "^19",
|
"@types/react": "^19",
|
||||||
"@types/react-dom": "^19"
|
"@types/react-dom": "^19",
|
||||||
|
"typescript": "^5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ import styles from "./page.module.css";
|
|||||||
import dynamic from 'next/dynamic';
|
import dynamic from 'next/dynamic';
|
||||||
|
|
||||||
const CodeExample = dynamic(
|
const CodeExample = dynamic(
|
||||||
() => import('../components/CodeExample'),
|
() => import('../components/CodeExample')
|
||||||
{ ssr: false }
|
|
||||||
);
|
);
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
|
|||||||
Reference in New Issue
Block a user