DEV Community

loading...

Discussion on: Using Vue in WordPress

Collapse
workingwebsites profile image
Lisa Armstrong Author

You're right, technically you don't have to register them, but it is a recommended practice to manage scripts and dependencies.

From WordPress:
"the main purpose of the register functions is to allow you to simplify your code by removing the need to duplicate code if you enqueue the same script or style in more than one section of code."

If you were using your Vue plugin in a number of areas, it would be handy. It would make the plugin more standalone, and not dependent on a line of code in the header.