Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gist for my "WordPress: Laravel Mix, Sass and ES6 Modules in theme development" tutorial at https://since1979.dev/wordpress-laravel-mix-sass-and-es6-modules-in-theme-development/
// Import components.
import Example from './components/example.js';
import ExampleTwo from './components/example-2.js';
// Initialize your components on DOM Ready.
$(document).ready( () => {
Example.init({
setting: 'New setting'
});
ExampleTwo.init();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment