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

Introduce some config props & bundling changes.

Open sid1029 opened this issue 5 months ago • 1 comments

Introducing a few more config props & bundling changes

The current implementation uses:

import * as monacoEditor from 'monaco-editor'

which causes the entire 3.2MB Monaco Editor library to be bundled with the solid-monaco wrapper, defeating the purpose of dynamic loading.

✅ Changed to import type * as monacoEditor from 'monaco-editor' (types only) ✅ Added CDN fallback for out-of-the-box functionality

This also addresses #https://github.com/alxnddr/solid-monaco/issues/7 Fixed type definition for DiffEditor options so diff editor specific features can be configured.

New Features

  • line prop: Jump to specific line numbers in the editor
  • onBeforeMount prop: Configure Monaco before editor creation (renamed from beforeMount)
  • onValidate prop: Real-time validation marker callbacks

Added some documentation for how to use the library.

Added a devcontainer config.

GitHub Actions Updates

  • Modernized workflows: Updated all actions to latest versions (@v4, @v5, @v3)
  • Matrix testing: Added Node.js 18/20/22 testing
  • New release workflow: Automated NPM publishing and GitHub releases

sid1029 avatar Aug 01 '25 23:08 sid1029

@alxnddr would you be able to take a look at this ?

This effectively reverts your latest change that bundles 'monaco-editor' with solid-monaco. I've described an alternate way of bundling monaco-editor in the readme while still keeping the old way of CDN loading monaco as the default.

Proposing this because currently we (and others #7) are not able to upgrade to the newer version of solid-monaco.

sid1029 avatar Aug 04 '25 17:08 sid1029