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

processCssUrls is not working as expected #4

Open
jakewhiteley opened this issue Jul 21, 2022 · 0 comments
Open

processCssUrls is not working as expected #4

jakewhiteley opened this issue Jul 21, 2022 · 0 comments

Comments

@jakewhiteley
Copy link

I would expect the below code to copy fonts/Inter-Regular.woff2 into my configured public directory, and add it to the mix-manifest.json.

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
	@font-face {
		font-family: 'Inter';
		font-style:  normal;
		font-weight: 400;
		font-display: swap;
		src: url("../fonts/Inter-Regular.woff2") format("woff2"),
			url("../fonts/Inter-Regular.woff") format("woff");
	}
}

It doesn't however - no font files are moved and no entry is added.

If I remove .tailwind() from my webpack-config, then the font file is moved and versioned correctly.

My config:

let mix = require('laravel-mix')
require('mix-tailwindcss')

mix.js('docs/assets/js/index.js', 'assets/js')
	.setPublicPath('_site')
	.version()
	.sass('docs/assets/sass/index.scss', 'assets/css')
	.tailwind('./docs/tailwind.config.js')

if (!mix.inProduction()) {
	mix.browserSync({
		server: "_site",
		files: ["_site/**/*.html", "_site/assets/css/*.css", "_site/assets/js/*.js"]
	})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant