This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Enqueue a script with asset file | |
* | |
* @param string $script_url the URL to the script file | |
* @param string $handle the handle for the script | |
* @param string $translation_domain the translation domain | |
* @param string $translation_path the translation path | |
*/ | |
function luther_utils_enqueue_script( $script_url, $handle = "", $translation_domain = "", $translation_path = "" ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' ); | |
const { merge } = require( 'webpack-merge' ); | |
// get default configs | |
const [ scriptConfig, moduleConfig ] = defaultConfig; | |
/** | |
* Override script config | |
* the script config is the default config, which is used with or without the --experimental-modules flag |