Code Monkey home page Code Monkey logo

Comments (6)

arunbasillal avatar arunbasillal commented on August 27, 2024

Hello @koconder

The manifest and service worker are static files right now where the domain names are written into. You will find these in the root folder of the WordPress install.

The solution in these cases might happen if we can get #38 happen. Currently we are exploring the possibility.

from super-progressive-web-apps.

koconder avatar koconder commented on August 27, 2024

@arunbasillal how is superpwa injected onto the page or loaded initially? As if browser is looking for a file i could easily do some magically rewrite rules on ngnix.

from super-progressive-web-apps.

arunbasillal avatar arunbasillal commented on August 27, 2024

Here is the service worker registration script

/**
* Register service worker
*
* @refer https://developers.google.com/web/fundamentals/primers/service-workers/registration#conclusion
*
* @since 1.0
*/
function superpwa_register_sw() {
wp_enqueue_script( 'superpwa-register-sw', SUPERPWA_PATH_SRC . 'public/js/register-sw.js', array(), null, true );
wp_localize_script( 'superpwa-register-sw', 'superpwa_sw', array(
'url' => superpwa_sw( 'src' ),
)
);
}
add_action( 'wp_enqueue_scripts', 'superpwa_register_sw' );

The error is not because of an incorrect URL to the service worker. But because in the service worker: https://www.ayanajewellery.com/superpwa-sw.js the links are hard coded to https://www.ayanajewellery.com.

from super-progressive-web-apps.

koconder avatar koconder commented on August 27, 2024

Thanks @arunbasillal - Could we leave the issue open till we have some update on #38 - Thanks

from super-progressive-web-apps.

arunbasillal avatar arunbasillal commented on August 27, 2024

You got it 👍

from super-progressive-web-apps.

koconder avatar koconder commented on August 27, 2024

Hi @arunbasillal or others, could you please help me with the multi-domain setup as described above. Now that we have hooks like superpwa_sw_filename

Hows best to configure my site functions per domain?

from super-progressive-web-apps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.