I’m trying to use jquery in an adminhtml js file…but it seems not to be working and can’t get to understand why…any help would be appreciated !
Layout is like
<head>
<script src="Vendor_Module::js/logger.js"/>
</head>
Js file is like
define([
'jquery'
], function ($) {
'use strict';
});
But this throw me the error :
require.js:166 Uncaught Error: Mismatched anonymous define() module: function ($) {
‘use strict’;
}
http://requirejs.org/docs/errors.html#mismatch
at makeError (require.js:166:17)
at intakeDefines (require.js:1221:36)
at require.js:1408:25