codex-team/hawk.javascript

Chrome does not work with your cdn

dimmduh opened this issue · 1 comments

Error on console

Refused to execute script from 'https://cdn.rawgit.com/codex-team/hawk.javascript/master/hawk.js' because its MIME type ('') is not executable, and strict MIME type checking is enabled.

Hey, @dimmduh

Also you get a 404 error for this response. It is not a Chrome's bug.

We have moved package's main file from /hawk.js to /dist/hawk.js location.

How to use RawGit CDN

RawGit can return files by target repo's branch of specific commit hash.
https://cdn.rawgit.com/owner/repo/branch_or_commit/path_to_file

In this link you passed master as a branch name.

https://cdn.rawgit.com/codex-team/hawk.javascript/master/hawk.js

So on repo (branch) updates some files could be moved (why not) and you'll get 404 on their last locations.

That's why you should use links with a commit's hash on production.

Read «Load from CDN» part of installation guide.

Getting NPM-package sources from CDN

We have found a better way to load single-file NPM package script from jsDelivr CDN.

You can load a target version main script of package.

https://cdn.jsdelivr.net/npm/package@version

To get the latest hawk.javascript use the following link. You need no enter path to target file.

https://cdn.jsdelivr.net/npm/hawk.javascript@2.0.0