deecewan / webapp-manifest-plugin

Create a web application manifest for your PWA based on your webpack build.
5 stars 6 forks source link

Not generating Manifest changes with webpack3 #2

Open cescoferraro opened 7 years ago

cescoferraro commented 7 years ago

Hi @deecewan !

Thanks for the library, looks awesome! Seems like just what I need to solve this issues

screen shot 2017-06-21 at 21 19 25

But have not been able to emit any change what so ever.Am I missing anything?

const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
const WebappManifest = require('webapp-manifest-plugin');
const WebappManifestPlugin = WebappManifest.default;
const FAVICON_PLUGIN = WebappManifest.FAVICON_PLUGIN;

new FaviconsWebpackPlugin({
    prefix: 'icons/',
    logo: './shared/icon/favicon.png'
}),
new WebappManifestPlugin({
    icons: FAVICON_PLUGIN, 
    start_url: "https://acharh.cescoferraro.xyz/",
    theme_color: "#Ffa500"
}),
deecewan commented 7 years ago

hey there! I haven't actually tested with webpack 3. I wouldn't think I'm doing anything too crazy, so it should work.

I'll take a look after work 👍 . Thanks for the report.

cescoferraro commented 7 years ago

@deecewan I think the issue is that you are hard coding the manifest path at https://github.com/deecewan/webapp-manifest-plugin/blob/master/src/index.js#L57

And I overwritting it with favicons { prefix: 'icons/', logo: './shared/icon/favicon.png' }

Anyhow, I still do not get a manifest at /manifest.json. I think thats because I am not using htmlplugin, so I also never am able to get inside here https://github.com/deecewan/webapp-manifest-plugin/blob/master/src/index.js#L49

What do you think?

deecewan commented 7 years ago

This plugin is designed solely for use with html-webpack-plugin. Otherwise, it can't inject the correct items into the head of the page.

What are you using to generate your HTML?

cescoferraro commented 7 years ago

@deecewan its a SSR website. My html is just another react component that I render with renderToStaticMarkUp.