title: loading texture atlas with PIXI Js and parcel bundler
body: <p>I'm new with JS programming and pixi JS. I try to load a texture atlas from json like tutorial module here : <a href="https://github.com/kittykatattack/learningPixi#spriteproperties" rel="nofollow noreferrer">https://github.com/kittykatattack/learningPixi#spriteproperties</a></p>
  <p>I use typescript, node js and parcel bundler as simpler as possible.
  My problem is that my texture atlas won't load even if i use PIXI.loader. I have tried an example directly in html file and i haven't got any problem.</p>
  <p>I use :
  PIXI 5.3.3 (latest release),
  parcel 1.12.4,
  Typescript 4.0.3</p>
  <p>My index.ts:</p>
  <pre><code>import textPack from &quot;./assets/textPack.json&quot;
  ...
  let loader = PIXI.loader.shared
  loader.add(&quot;./assets/textPack.json&quot;)
        .load(setup)
  
  function setup {
       let id = loader.resources[&quot;./assets/textPack.json&quot;].textures
       let soldier = new PIXI.Sprite(id[&quot;soldier.png&quot;])
       app.stage.addChild(soldier)
  }
  </code></pre>
  <p>here is my package.json</p>
  <pre><code>{
    &quot;name&quot;: &quot;parcel-tuto&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;main&quot;: &quot;index.js&quot;,
    &quot;dependencies&quot;: {},
    &quot;devDependencies&quot;: {
      &quot;parcel-bundler&quot;: &quot;^1.12.4&quot;,
      &quot;parcel-plugin-asset-copier&quot;: &quot;^1.1.0&quot;,
      &quot;pixi-sound&quot;: &quot;^3.0.5&quot;,
      &quot;pixi.js&quot;: &quot;^5.3.3&quot;,
      &quot;typescript&quot;: &quot;^4.0.3&quot;
    },
    &quot;scripts&quot;: {
      &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;,
      &quot;start&quot;: &quot;./node_modules/.bin/parcel index.html&quot;
    },
    &quot;assetsPath&quot;: &quot;src/assets/&quot;,
    &quot;keywords&quot;: [&quot;assets&quot;],
    &quot;author&quot;: &quot;&quot;,
    &quot;license&quot;: &quot;ISC&quot;
  }
  </code></pre>
  <p>Typescript return : TS2532: Object is possibly 'undefined'.
  The .json and .png associate are not copied into the parcel dist folder</p>
  <p>A console.log onto loader.resources['...'] say :</p>
  <pre><code>json datas :  
  Resource {_flags: 2, name: &quot;./assets/textPack.json&quot;, url: &quot;./assets/textPack.json&quot;, extension: &quot;json&quot;, data: null, …}
  children: Array(0)
  length: 0
  __proto__: Array(0)
  crossOrigin: &quot;&quot;
  data: null
  error: Error: Error trying to parse loaded json: SyntaxError: Unexpected token &lt; in JSON at position 0 at Resource.abort (http://localhost:1234/src.f10117fe.js:28599:18) at Resource._xhrOnLoad (http://localhost:1234/src.f10117fe.js:29046:18)
  extension: &quot;json&quot;
  loadType: 1
  metadata: {}
  name: &quot;./assets/textPack.json&quot;
  ...
  </code></pre>
  <p>At the end nothing work.
  Have you encountered this issue before ?</p>
  <p>Thank's for your help.</p>