Fabian
Fabian

Reputation: 129

Access property from webpack.config.js within a plugin?

Imagine having a webpack.config.js file:

module.exports = {
...
  externals: ["dependency1"],
...
}

How can I access this information in my plugin, without passing this information directly in my Plugin Constructor? (I would prefer to have it at one place.)

Upvotes: 2

Views: 765

Answers (1)

Igor
Igor

Reputation: 809

Try compilation.options.externals. Some information about the compilation object here (nothing about the options property though).

Upvotes: 3

Related Questions