Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 8, 2019. It is now read-only.
/docsPublic archive

using plugins

Joseph Hou edited this pageFeb 10, 2016 ·10 revisions

Use plugins to add functionality typically related to bundles in webpack. For example, theBellOnBundlerErrorPlugin will notify you of an error in the bundler build process.

Built-in plugins

Plugins are included in your module by using the plugins property in the webpack config.

// webpack should be in the node_modules directory, install if not.varwebpack=require("webpack");module.exports={plugins:[newwebpack.ResolverPlugin([newwebpack.ResolverPlugin.DirectoryDescriptionFilePlugin("bower.json",["main"])],["normal","loader"])]};

Other plugins

Plugins that are not built-in may be installed via npm if published there, or by other means if not:

npm install component-webpack-plugin

which can then be used as follows:

varComponentPlugin=require("component-webpack-plugin");module.exports={plugins:[newComponentPlugin()]}

When installing third party plugins via npm it is advised to use this tool:https://www.npmjs.com/package/webpack-load-plugins

It checks for all third party plugins installed in your dependencies and lazyloads them when you need them.

See also

webpack 👍

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp