Custom js file compiled but not enqueued

I’ve specified an additional JS file in my manifest.json

When I run gulp it produces the distr/ file, but it does not appear in the html, as if it was not enqueued in WP.

Why?

Here is the manifest. The missing file is “ads.js”

{
	"dependencies": {
		"main.js": {
			"files": ["scripts/mobile-navigation.js", "scripts/main.js"],
			"bower": ["js-cookie", "venobox", "bxslider-4"],
			"main": true
		},
		"ads.js":{
			"vendor": ["assets/scripts/bla/bla.novastnoajaxnofingerprint.min.js", "assets/scripts/bla/htmlParser.js", "assets/scripts/bla/postscribe.js", "assets/scripts/bla/insertAdTag.js"],
			"files": ["scripts/ads.js"],
			"main": true
		},
		"main.css": {
			"files": "styles/style.scss",
			"main": true
		},
		"editor-style.css": {
			"files": ["styles/editor-style.scss"]
		},
		"login.css": {
			"files": ["styles/login.scss"],
			"main": true
		},
		"jquery.js": {
			"bower": ["jquery"],
			"main": true
		}
	},
	"config": {
		"devUrl": "http://domain.loc"
	}
}

Because you still need to enqueue it in setup.php

1 Like

Oh my. I was under the impression that it was automagically added via lib/assets.php. But indeed, as I look at it now, there are no enqueuing done there.

Thank you very much!