Skip to content

Changes to JavaScripts files have no effect #17

Description

@cooperwalter

In Section 11, Lesson 50, we're asked to make a change to src/index.js (adding an alert). When visiting my site's homepage, I did not see the alert. I performed a "Hard Reload" and an "Empty Cache and Reload", but neither resolved my issue. I found that changing which JavaScript file was enqueued in functions.php from /src/index.js to /build/index.js caused the alert to appear.

So, in functions.php, I changed this:

function university_files()
{
    wp_enqueue_script('main-university-js', get_theme_file_uri('/src/index.js'), array('jquery'), '1.0', true);
	...
}

To this:

function university_files()
{
    wp_enqueue_script('main-university-js', get_theme_file_uri('/build/index.js'), array('jquery'), '1.0', true);
	...
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions