# Import editor's Loader module

**URL:** <https://discourse.threejs.org/t/import-editors-loader-module/23776>\
**Category:** Questions\
**Tags:** editor\
**Created:** [February 23, 2021, 11:00pm UTC](https://discourse.threejs.org/t/import-editors-loader-module/23776 "2021-02-23T23:00:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hobzcalvin](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/hobzcalvin/32/16607_2.png) [@hobzcalvin](https://discourse.threejs.org/u/hobzcalvin)\
**Post date:** [February 23, 2021, 11:00pm UTC](https://discourse.threejs.org/t/import-editors-loader-module/23776/1 "2021-02-23T23:00:59Z")

</div>

I’d like to import and use the Loader module that enables loading of arbitrary files:

> <https://github.com/mrdoob/three.js/blob/312ee7b016c9bb35abe2b9e627829a7d4eb89a2e/editor/js/Loader.js>

But the editor doesn’t appear to be a part of package.json, so I can’t npm install it. Is there some smart way to get the editor code into my application, other than copy-pasting the code, cloning the github repo, or something gross like that?

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [February 24, 2021, 12:56am UTC](https://discourse.threejs.org/t/import-editors-loader-module/23776/2 "2021-02-24T00:56:01Z")

</div>

The Editor is provided as a standalone web application, but not as a part of the library. That file also depends on the command pattern system used by the editor. I think you will want to fork it and then edit according to your needs.

---

<div class="post-metadata">

**Author:** ![hobzcalvin](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/hobzcalvin/32/16607_2.png) [@hobzcalvin](https://discourse.threejs.org/u/hobzcalvin)\
**Post date:** [February 24, 2021, 6:55am UTC](https://discourse.threejs.org/t/import-editors-loader-module/23776/3 "2021-02-24T06:55:29Z")

</div>

Thanks @donmccurdy, and hey, I think I’m about to use your three-to-cannon package in this project, so thanks for that!!

The quick and dirty solution I’m trying is adding three.js as a submodule in my git repo, then importing the loader. I will have to spoof the editor object and its command system as you say, and so far the code bloat it adds to builds is pretty annoying. I think a fork of three.js that suits my needs would never be compatible with upstream changes, so it might as well be a copy-paste if I can’t make this submodule thing work.
