shellscape / webpack-manifest-plugin

webpack plugin for generating asset manifests
MIT License
1.44k stars 184 forks source link

Invalid JS in Documentation #91

Closed mvastola closed 6 years ago

mvastola commented 6 years ago

Heya, super small thing.. At https://github.com/danethurber/webpack-manifest-plugin/blob/master/README.md#api you guys have:

// webpack.config.js

module.exports = {
  output: {
    publicPath
  },
  plugins: [
    new ManifestPlugin(options)
  ]
}

But publicPath is a key in an object and should be assigned to a sample string value. (Ideally this code should be able to be copy/pasted without generating an error.)

mastilver commented 6 years ago

Hi @mvastola

The Usage section is there for that, the API section is just there to explain which variable the plugin is taking

Also please be aware that the docs are referring to v2, check https://github.com/danethurber/webpack-manifest-plugin/tree/1.x at the moment (I know it's not ideal...)

mvastola commented 6 years ago

Yeah. It's not a big deal. IMHO, there's no reason it shouldn't be "correct" though.

And yeah. I'm using v2. Also it says the same thing in the README.md, though I'm also just noticing the plugin is misspelled weboack-manifest-plugin in that instance.

Sorry for being a bit anal.

mastilver commented 6 years ago

there's no reason it shouldn't be "correct" though.

To me the API section shouldn't be correct, it's here to describe the plugin inputs

I'm also just noticing the plugin is misspelled weboack-manifest-plugin in that instance.

Noticed that as well, was too lazy to change it.... :p

mvastola commented 6 years ago

Hah. Ok. I was wondering if you were gong to tell me "The Usage section is there for spelling things correctly." :-p