monaco-react icon indicating copy to clipboard operation
monaco-react copied to clipboard

Unable to use 'loader' with NextJS

Open a3957273 opened this issue 2 years ago • 4 comments

Describe the bug Attempting to use the npm version of monaco, as we're unable to have any external dependencies (e.g. jsdelivr). Using the loader errors out with an 'importing global CSS' issue.

To Reproduce

See https://codesandbox.io/p/sandbox/silly-napier-513qic

Expected behavior I'm able to use React Monaco inside NextJS without relying on a CDN

a3957273 avatar Jan 24 '23 00:01 a3957273

Using monaco-editor-webpack-plugin in tandem with next-transpile-modules fixed the 'importing global CSS' issue. Still not able to get a working minimal example. Now getting:

TypeError: setting getter-only property "marked"

CodeSandbox: https://codesandbox.io/p/sandbox/distracted-carson-0q5erj

a3957273 avatar Jan 24 '23 00:01 a3957273

got the same issue. Hope to get how to external monaco-editor

LaamGinghong avatar Jun 14 '23 08:06 LaamGinghong

@a3957273 @LaamGinghong did you happen to find a solution for this? same issue.

ishan-diablo avatar Jan 16 '24 11:01 ishan-diablo

same issue.

zjy365 avatar Jun 27 '24 05:06 zjy365

This issue has been marked as stale due to inactivity. It will be closed in 7 days unless further activity occurs.

github-actions[bot] avatar Apr 08 '25 00:04 github-actions[bot]

Closing due to inactivity. Feel free to reopen if needed.

github-actions[bot] avatar Apr 15 '25 00:04 github-actions[bot]