Magento 2 – Static Files Not Deploying in Developer Mode

404less-cssmagento2static-content

I am using Magento 2 (developer mode) and I just created a new theme, added a local-l.css to my /var/www/vendor/app/design/frontend/vendor/theme/web/css/source/local-l.css and when I refresh the homepage it says

404 GET
http://www.vendor.dev/pub/static/version1486248173/frontend/vendor/theme/en_US/css/local-l.css

app/design/frontend/vendor/theme/Magento_Theme/layout/default_head_blocks.xml:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/framework/Module/etc/module.xsd">
<head>
    <css src="css/local-l.css" />
</head>
</page>

And doesn't load my styles.. I tried clearing cache, view_preprocessed, pub/static/*, everything and I tried redeploying using static:mode:deploy… nothing is working for me.

Any ideas?

Best Answer

Seem that your custom css put wrong place, it should be under web/css folder in your custom theme : app/design/frontend/vendor/theme/web/css/local-l.css.

Remember to run static content deploy again.

Related Topic