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

Minified files not on github (dist folder). Workarround. #258

Open
nextgenthemes opened this Issue Jan 16, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@nextgenthemes

nextgenthemes commented Jan 16, 2018

Its pretty common that packages have the dist folder with minified filed on Github. For this project they are only on NPM but not here.

If you like me just want to copy paste the relpreload js to inline it you can get the latest this way without any npm or other stuff.

https://cdn.jsdelivr.net/npm/fg-loadcss@latest/dist/cssrelpreload.min.js

@j-pinder

This comment has been minimized.

Show comment
Hide comment
@j-pinder

j-pinder Jan 26, 2018

The minified file returns an error in the console "!undefined is not an object(evaluating t.loadcss) in Safari. The CSS fails to load in Safari, where JS is enabled.

Google Chrome the error reads "Uncaught TypeError: Cannot read property 'loadCSS' of undefined
at load.js:10
at load.js:100". Google Chrome loads the CSS using rel="preload".

I've minified the code with Codekit and Javascript Minifier online. I've also linked to this CDN link, which the minified code is the same as what I've created from the above-mentioned and also has an error.

I'm trying to find a way to minify the file while maintaining functionality. If it has worked for you, can you advise, and maybe assist in pointing out what might be the cause.

j-pinder commented Jan 26, 2018

The minified file returns an error in the console "!undefined is not an object(evaluating t.loadcss) in Safari. The CSS fails to load in Safari, where JS is enabled.

Google Chrome the error reads "Uncaught TypeError: Cannot read property 'loadCSS' of undefined
at load.js:10
at load.js:100". Google Chrome loads the CSS using rel="preload".

I've minified the code with Codekit and Javascript Minifier online. I've also linked to this CDN link, which the minified code is the same as what I've created from the above-mentioned and also has an error.

I'm trying to find a way to minify the file while maintaining functionality. If it has worked for you, can you advise, and maybe assist in pointing out what might be the cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment