Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single js file #191

Open
ombr opened this issue Feb 16, 2023 · 1 comment
Open

Single js file #191

ombr opened this issue Feb 16, 2023 · 1 comment

Comments

@ombr
Copy link

ombr commented Feb 16, 2023

Hi @simonihmig,

I have a use case where I need to get a single js file representing an Ember app. (that could work offline)
Would you happen to have any recommendations on how I should try to do this?

It would mean putting together all the files in the index and maybe forcing WebPack to export a single chunk.

The second question is I would like to use that js file with just an eval and if possible without polluting the global scope.
The idea here is I would like to copy the javascript file and do something like this.

const EmberApp = eval('__SOURCE_OF_EMBED.JS__');
const myApp = new EmberApp(myDomElement);

Any ideas on how I could do this?

I really appreciate any help you can provide.

Luc

@ombr
Copy link
Author

ombr commented Mar 3, 2023

If anybody end up resuming what I did here: https://discord.com/channels/480462759797063690/1075868553049284628

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant