Ionic-app-scripts: .d.ts, .js and .js.map files in src.

Created on 13 Mar 2017  路  18Comments  路  Source: ionic-team/ionic-app-scripts

Short description of the problem:

My src directory is randomly flooded with .d.ts, .js and .js.map files.

What behaviour are you expecting?

For these unnecessary files not to be there.

Steps to reproduce:

There isn't really any steps to re-produce this as I wasn't really doing anything out of the ordinary... The last thing I did before I noticed this was creating some promises and observers for geolocation data.

Which @ionic/app-scripts version are you using?

1.0.0

Other information:

This issue seems related: https://github.com/driftyco/ionic-app-scripts/issues/136... though I have no idea what angular barrels are.

Most helpful comment

All 18 comments

I decided to delete all the garbage files and they haven't come back yet. I'll re-open this if it happens again.

This happened to me again.

What I was doing:

  • I was working on a practically empty project
  • I had ionic serve running in the background
  • I created a new provider i.e. ionic g provider Camera
  • While copying / pasting code into the provider, I got an error about not having an import and a bunch of garbage files were generated.

It is likely the IDE that is generating these. We only write files to memory.

Thanks,
Dan

I use sublime text though, which doesn't do anything in terms of writing files. I'm pretty sure it's an ionic serve / webpack issue.

Hmm, it does seem weird. I think we'd hear about this is a lot if it was a common thing. Hmmm. I'm not sure where to go.

Weird indeed. I'll keep an eye out for if it happens again (it hasn't in a while) and update this with any findings.

same error here ! my directory src/providers just got flooded with .js an .map files. I don't how !

Just happened to me. Ionic v2.4.8. IntelliJ Ultimate 2017. IDE is set to _not_ compile Typescript.

Same here sublime text 3

Same to me, also sublime text 3... perhaps sublime does has something to do with it...

Same thing happened to me as well. Sublime text 3.
Can I delete them? Does it affect my app functionality?

@sangwin From what I remember deleting them is fine.

I haven't had this problem since I switched to VS Code, which is a much better development experience anyways. I'd definitely recommend it to anybody who hasn't tried it yet.

I have had this happen multiple times with VS code.

Same here, Sublime Text 3. First time and have built hundreds of times

@shaneparsons, I have had! ^^" and also friends of mine. so...

Ctrl + b compiles .ts files into their respective .js and .js.map files.
Thats what happened for me, using Sublime Text 3 and the TypeScript plugin. Not an Ionic issue!

this just happen to me, because accidentally click ctrl + b to make typescript plugin on sublime text 3 compile all ts to js. To remove all unnecessary js and map file, try this on your src folder (with cmd)
Windows
del /s *.js
del /s *.map

Mac
find . -name '*.js' -delete
find . -name '*.map' -delete

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nalkon picture nalkon  路  4Comments

loicfavory picture loicfavory  路  4Comments

MarkErik picture MarkErik  路  3Comments

NoNameProvided picture NoNameProvided  路  4Comments

azakusilo picture azakusilo  路  4Comments