Code Monkey home page Code Monkey logo

Comments (8)

gflegar avatar gflegar commented on August 25, 2024 3

Seems that ./assets works too, like @bboehm86 suggested, though not sure why. I'm able to build for gh-pages by using the following import in AppModule:

MonacoEditorModule.forRoot({baseUrl: "./assets"})

from ngx-monaco-editor.

bboehm86 avatar bboehm86 commented on August 25, 2024 1

I guess ./assets as default would be ok too 🤔

from ngx-monaco-editor.

yowari avatar yowari commented on August 25, 2024

Well, if you don't provide --base-href option in ng build --prod, /assets will be used (default behaviour).
This, for example, can help to set npm script to build Angular app for gh-pages and prod (exemple: for Docker) easily without changing code. The other ways is to set env variable for assets path or as i do in my project, retrieve the base-href path used.
I already submitted a PR #64 . It not really a good solution but it works 😕

from ngx-monaco-editor.

crevan236 avatar crevan236 commented on August 25, 2024

I'm facing that problem too.
Any walkaround?

OK, after i wrote that i read @yowari comment once again and i'll try that way. Thanks =)

from ngx-monaco-editor.

pinktoadette avatar pinktoadette commented on August 25, 2024

this doesn't work for me

from ngx-monaco-editor.

crisz avatar crisz commented on August 25, 2024

Seems that ./assets works too, like @bboehm86 suggested, though not sure why. I'm able to build for gh-pages by using the following import in AppModule:

MonacoEditorModule.forRoot({baseUrl: "./assets"})

This worked perfectly for me. It should be quoted in the Readme.md in my opinion

from ngx-monaco-editor.

OleksandrGavryshko avatar OleksandrGavryshko commented on August 25, 2024

It's doesn't work for me too

from ngx-monaco-editor.

maitrungduc1410 avatar maitrungduc1410 commented on August 25, 2024

it works fine for me, even with remote URL:

MonacoEditorModule.forRoot({
  baseUrl: 'http://localhost:53015/assets'
})

from ngx-monaco-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.