Skip to content

Single js file #191

@ombr

Description

@ombr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions