Webpack config has an unknown property 'preLoaders'

后端 未结 6 2061
青春惊慌失措
青春惊慌失措 2020-12-29 03:57

I\'m learning webpack from scratch. I\'ve learned how to link javascript files with require. I\'m bundling and minifying my js files and i\'m listening for changes with watc

6条回答
  •  难免孤独
    2020-12-29 04:52

    You are apparently trying to use examples for webpack v1 with webpack v2. Straight from the changelog:

      module: {
    -   preLoaders: [
    +   rules: [
          {
            test: /\.js$/,
    +       enforce: "pre",
            loader: "eslint-loader"
          }
        ]
      }
    

提交回复
热议问题