Want to take a look at our new docs? Our new docs are now in beta. Have fun!

Webpack 插件

如何添加 Webpack 插件?

可以在 nuxt.config.js 中添加 Webpack 插件:

const webpack = require('webpack')

module.exports = {
  build: {
    plugins: [
      new webpack.ProvidePlugin({
        $: 'jquery',
        _: 'lodash'
        // ...etc.
      })
    ]
  }
}