eyasliu / webpack-eslint-plugin

async run eslint for webpack plugin
0 stars 1 forks source link

not supported use require? #1

Closed sinchang closed 7 years ago

sinchang commented 7 years ago

use:

const EslintPlugin = require('webpack-eslint-plugin')

and

config.plugins.push(new EslintPlugin({
  format: require('eslint-friendly-formatter'),
  include: ['src/**/*.vue', '**/*.js']
 }))

error:

TypeError: EslintPlugin is not a constructor
sinchang commented 7 years ago

解决办法:

const EslintPlugin = require('webpack-eslint-plugin').default