node.js - Webpack/TypeScript Raising Errors When node_modules is Excluded -


i have following webpack , typescript configs:

webpack.config.js

module.exports = {     entry: {         dev: './src/ts/site'     },     output: {         filename: './com/js/site.js'     },     resolve: {         extensions: ['', '.ts', '.tsx']     },     module: {         loaders: [             // typescript             {                 test: /\.tsx?$/,                 loader: 'ts-loader'             }         ]     } } 

tsconfig.json

{     "compileroptions": {         "noimplicitany": true,         "module": "commonjs"     } } 

i've simplified project include following dependencies:

package.json (partial)

"typescript": "^1.7.5", "ts-loader": "^0.7.2", "webpack": "^1.12.9" 

when run webpack, massive slew of errors:

enter image description here

the list goes on many many screen lengths, far i've scrolled every 1 duplicate identifier error in .d.ts file.

what cause of these errors?

i've seen several similar problems both here on stack, , across web, none seemed happen in project typescript (they had other modules had definition files).

from i've gathered may have use of "module": "commonjs", but

  1. that suggest typescript wasn't written work commonjs modules
  2. i've tried every other module type no success

excluding node_modules in tsconfig.json solves problem makes installed modules can't found in .ts files.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -