Preact: How to add appcache manifest to my project?

Created on 21 Jun 2018  路  2Comments  路  Source: preactjs/preact

I just need help with this silly newbie question:

How to get appcache manifst working with preact? I have installed appcache-webpack-plugin and added it's object to config.plugins so my manifest.appcache is generated and saved into build, but it is not referenced from index.html i.e. <html> tag manifest property is not added. I went to webpack manual but their tutorial just suggest you have a full control on index.html and create one by hand. Preact gives me prebuilt index.html which I have no idea how to control.

Most helpful comment

I'm going to close the issue here, please move it to preact-cli if you have any questions!

Thank you and Good luck 馃榿

All 2 comments

For future reference, please open such an issue in preact-cli repo, there you'll be much more attention as it'll be more relevant.

in Preact CLI, you can create your own index.html if you don't want the one we generate for you.
It's as simple as:

1- create the html / ejs file in your working directory.

2- add it to your Preact watch and build scripts as in:

preact watch --template src/index.html

and in build as well

preact build --template src/index.html

You can now add whatever you want to this files header

Do not forget to add your webpack assets (JS & CSS files) for more info look at this template

I'm going to close the issue here, please move it to preact-cli if you have any questions!

Thank you and Good luck 馃榿

Was this page helpful?
0 / 5 - 0 ratings

Related issues

skaraman picture skaraman  路  3Comments

jescalan picture jescalan  路  3Comments

KnisterPeter picture KnisterPeter  路  3Comments

mizchi picture mizchi  路  3Comments

marcosguti picture marcosguti  路  3Comments