I have a large Angularjs application. There is also a small project in Svelte.
I need to insert an svelte-application into the first project, how can this be done? How to transfer components? How to build a project?
I have a large Angularjs application. There is also a small project in Svelte.
I need to insert an svelte-application into the first project, how can this be done? How to transfer components? How to build a project?
If you are talking about including the compiled Svelte app inside of your AngularJS app I believe you can do this as follows:
AngularJS app that you wish to attach your Svelte app to: new App({
target: document.getElementById('someElement'),
});
npm run build).index.html (or wherever you want to load the Svelte app) load in your bundle.js via a script tag and you bundle.css via a style tag.This should attach the app to the element (with ID someElement) specified above.