You don't need to change the order. you just have to declare that your script depends on jquery.
Make your someJs.js
file look like this
define([
'jquery'
//you can add here any other dependencies you have
], function($) {
...your file content here
});
[EDIT]
If the js is from an source you cannot modify, like a third party module you can just create your own module that contains a js file with this content
require([
'jquery',
'VendorNamespace_Module/someJs'
]);
then include that file in the layout instead of VendorNamespace_Module/someJs.js
.
This should load jquery before the vendor js.
But on the side note...if you got a third party module that has a js file that does not start with require
or define
then it might be something wrong with the module.
you can add in one of your modules in the di.xml
file this:
<preference for="Magento\Framework\DB\LoggerInterface" type="Magento\Framework\DB\Logger\File"/>
The Magento\Framework\DB\Adapter\Pdo\Mysql
class that is used to run the actual queries has a logger member Magento\Framework\DB\LoggerInterface
.
By default, the preference for this dependency is set in app/etc/di.xml
<preference for="Magento\Framework\DB\LoggerInterface" type="Magento\Framework\DB\Logger\Quiet"/>
this Magento\Framework\DB\Logger\Quiet
does nothing.
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\DB\Logger;
class Quiet implements \Magento\Framework\DB\LoggerInterface
{
/**
* {@inheritdoc}
*/
public function log($str)
{
}
/**
* {@inheritdoc}
*/
public function logStats($type, $sql, $bind = [], $result = null)
{
}
/**
* {@inheritdoc}
*/
public function critical(\Exception $e)
{
}
/**
* {@inheritdoc}
*/
public function startTimer()
{
}
}
change the preference to Magento\Framework\DB\Logger\File
and you should see the queries logged in var/debug/db.log
.
Magento comes with these 2 loggers (Quiet and File) buy default, but you can create your own in case you need a different way of logging queries.
Best Answer
Magento 2 DevDocs states the following:
Magento 2 uses require.js, an easy way to add media queries in JavaScript in a .phtml file would be done by: