chanlito / nestjs-extensions

[WIP] A bunch of useful and opinionated filters, modules, pipes... to use with Nest framework. 😻
42 stars 0 forks source link

Better way to import one extension? #6

Closed chriszrc closed 6 years ago

chriszrc commented 6 years ago

Currently the only extension I'd like to use in my project is the DtoPipe/Dto. However, if I just add a normal import like:

import { DtoPipe } from 'nestjs-extensions';

Even though I'm only importing DtoPipe (and similarly Dto in the entity), node complains that I need to install ALL of this libs dependencies, including things like mandrill, sequelize, etc., things I have no need for. If I change the import to:

import { DtoPipe } from 'nestjs-extensions/dist/dto';

Then everything works as expected, without having to install anything additional. Is this the recommended way to bring in just one "module" or extension from this project? Is there a better way?

chanlito commented 6 years ago

Yes, I'm working on it 😅 I know it's annoying.

chanlito commented 6 years ago

Everything should be fine by now.