shellscape / webpack-manifest-plugin

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

is it possible to generate the manifest to a file in conjunction with webpack dev server? #143

Closed kellyrmilligan closed 6 years ago

kellyrmilligan commented 6 years ago

I thought maybe

new ManifestPlugin({
          fileName: 'webpack-client-assets.json',
          writeToFileEmit: true
        }),

would do it, but not dice. using with webpack-dev-server pinned at 3.0.0, and

2.0.0-rc.2 of the plugin.

kellyrmilligan commented 6 years ago

tried downgrading to latest 1.x of this puglin, and still no dice.

mastilver commented 6 years ago

I do not get your issue... Are saying writeToFileEmit doesn't work?

kellyrmilligan commented 6 years ago

Yes. I’m trying to get the file generated on disk as well. ATM it’s only in memory

mastilver commented 6 years ago

Are you talking about the manifest? Or JS, CSS?

kellyrmilligan commented 6 years ago

Sorry yes the manifest.json, I’m doing a universal setup and want the manifest file always to be on disk so the server can pick it up.

mastilver commented 6 years ago

Hum... weird we have a test to cover that... https://github.com/danethurber/webpack-manifest-plugin/blob/24acf95aaaaa4a2050e5f62340b66b2d0f6932aa/spec/plugin.integration.spec.js#L368-L370

Can you try to create a failing test or create a repository to reproduce the issue?

kellyrmilligan commented 6 years ago

I guess I’m wondering is Memoery-fs what webpack dev server uses? I’m seeing the issue when using that. I’ll push up my current repo as it’s an example app still and update this with it.

kellyrmilligan commented 6 years ago

ok, so, this is my bad. I was creating a new project with all the latest stuff for the most part, then realized for this I was using webpack-dev-server@^3 with webpack 3. with webpack dev server 2 this is working as expected. sorry about this!

roborourke commented 6 years ago

I'm having the same issue, is this meant to support webpack-dev-server v3?

shadowc commented 3 years ago

I have this exact same issue... Are you implying this plugin does NOT support webpack-dev-server: 3.11.0 ?

shadowc commented 3 years ago

Downgrading to webpack-dev-server v2 isn't an option, it doesn't work in webpack 5.1...

shellscape commented 3 years ago

@shadowc please use the Edit feature on replies. Posting repeated replies generates unneeded noise. If you're having trouble with webpack-dev-server, check out https://github.com/shellscape/webpack-plugin-serve. It's a lot lighter