Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CSS-only entrypoints. #1

Closed
kadamwhite opened this issue Apr 19, 2019 · 1 comment
Closed

Support CSS-only entrypoints. #1

kadamwhite opened this issue Apr 19, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@kadamwhite
Copy link
Collaborator

Currently the way to support a CSS-only entrypoint is to pretend it is JS:

	Asset_Loader\autoenqueue(
		get_stylesheet_directory() . '/build/asset-manifest.json',
		'style.js', // Note: no JS file will exist.
		[
			'scripts' => [],
			'handle'  => 'mytheme-base-style',
		]
	);

This is confusing and should not be necessary.

@kadamwhite
Copy link
Collaborator Author

As of #22, this should be possible now with

Asset_Loader\register_asset(
    $manifest_file_system_path,
    'asset.css', // May not exist in DevServer context
    [ ... ]
);

Needs documentation but so does everything else in this lib. Closing out this issue, for now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant