K..
K..

Reputation: 4223

Using Webpack to bundle Nodejs code with node_modules

I found many tutorials on how to get things running without node_modules, but I want to run Webpack and end up with one JavaScript file, that contains all of my dependencies.

Upvotes: 0

Views: 740

Answers (1)

deepak_kumar
deepak_kumar

Reputation: 175

You can use Webpack configuration file in order to create one bundle file

output: {
    library: 'someLibName',
    libraryTarget: 'umd',
    filename: 'app.bundle.js',
    auxiliaryComment: 'Test Comment'
  }

above will crate a bunndle in the path you have defined.

Upvotes: 1

Related Questions