rogden / tailwind-config-viewer

A local UI tool for visualizing your Tailwind CSS configuration file.
2.01k stars 111 forks source link

When exporting to static html: Access to fetch from origin 'null' has been blocked by CORS policy #85

Closed autonomobil closed 6 months ago

autonomobil commented 1 year ago

Probably connected to https://github.com/rogden/tailwind-config-viewer/issues/62 image

rogden commented 6 months ago

@autonomobil Are you opening the index.html file directly from your filesystem? If that is the case you will always receive this error. If you want to run the exported site locally you will need to run it via a local server. There are a few node packages that can server a local directory or if you have php installed you can cd into the exported directory and run php -S localhost:3001 (or whatever port you want) and it will server the index.html file correctly without the CORS issue.