bili icon indicating copy to clipboard operation
bili copied to clipboard

Build all node_modules

Open skycult opened this issue 5 years ago • 4 comments

Hi,

great tool! It is so simple to build a new Node module! I've only a question: how I can build ALL node_modules inside a single package? I tried --bundle-node-modules option but nothing of modules into my package are bundled. What's wrong? Thank you!

skycult avatar Mar 10 '19 18:03 skycult

That should work, can you give me an example repo to reproduce?

egoist avatar Mar 11 '19 03:03 egoist

This is a simple index.js file:

const union = require('lodash/union');

class Service {
  constructor () {
    console.log(union([1, 2, 3], [4, 5, 6]));
  }
}

module.exports = Service;

I need that the bundled file contains lodash/union. Thank you

skycult avatar Mar 12 '19 08:03 skycult

Try converting require to import union from 'lodash/union'

egoist avatar Mar 13 '19 07:03 egoist

Thank you it works:

import union from 'lodash/union';

export class Service {
  constructor () {
    console.log(union([1, 2, 3], [4, 5, 6]));
  }
}

But now I'm not able to debug using VSCode. How I can use bili only when I need to build the library? Thank you

skycult avatar Mar 15 '19 21:03 skycult