In the WordPress world it's possible for a CSS dependency and a JS dependency to share the same handle. When using Asset Loader, this works fine for a production build but not when using webpack-dev-server during dev.
It appears that the latterly registered dependency gets skipped completely. In the example below, the main.js file gets enqueued but the style.css file does not.
\Asset_Loader\enqueue_asset(
plugin_dir_path( __DIR__ ) . 'build/asset-manifest.json',
'main.js',
[
'handle' => 'hello-world',
]
);
\Asset_Loader\enqueue_asset(
plugin_dir_path( __DIR__ ) . 'build/asset-manifest.json',
'style.css',
[
'handle' => 'hello-world',
]
);
May be related to #27
In the WordPress world it's possible for a CSS dependency and a JS dependency to share the same handle. When using Asset Loader, this works fine for a production build but not when using webpack-dev-server during dev.
It appears that the latterly registered dependency gets skipped completely. In the example below, the
main.jsfile gets enqueued but thestyle.cssfile does not.May be related to #27