jspm / npm

NPM Location Service
19 stars 34 forks source link

Include __filename and __dirname support #16

Closed guybedford closed 9 years ago

guybedford commented 9 years ago

Then it can be removed from SystemJS builder.

guybedford commented 9 years ago

The issue with this is that we don't know the filename and dirname until we're in the target environment.

guybedford commented 9 years ago

Aka it needs to be dynamic and handled in SystemJS itself.

lig commented 9 years ago

Well. The is here. What should one do to avoid this issue?

guybedford commented 9 years ago

@lig the SystemJS CommonJS module format comes with full support for this. Make sure the module in question is loading as a CommonJS module ("format cjs"; at the top of the file or System.config({ meta: { 'path/to/file.js': { format: 'cjs' } } })). Otherwise it may help to hear your exact issue here.

lig commented 9 years ago

Just filed my problem here https://github.com/brianc/node-postgres/issues/816