简体   繁体   中英

Typescript compiler bug renaming javascript file

I have a reference to this module found here:

https://github.com/basarat/typescript-collections

And I reference it in my typescript projects like this:

///<reference path='..\..\libs\collections.ts'/>

I use grunt to compile the project:

    typescript: {
        server: {
            src: ['src/server/**/*.ts'],
            dest: ['bin/server'],
            options: {
                module: 'commonjs',
                base_path: 'src/server',
                target: 'es5'
            }
        }
    }

Anyway, for some reason the compiler is outputting the file as either ctions.js or lections.js , as though its truncating the name somehow.

Any ideas?

EDIT

Ok so after some experimentation, I renamed the module to "testing" and the name gets truncated to ng.js. It seems that something within this module is modifying the output file name.

It looks like a grunt problem. Try compiling with tsc manually or check out grunt-ts : https://npmjs.org/package/grunt-ts

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM