Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
add extension to relative imports to make the code work directly in a…
Browse files Browse the repository at this point in the history
… browser

relative imports require the full path including the extension because browsers use the import name to make a network request and they do not implicitly add a .js file extension if one is missing
  • Loading branch information
JakeChampion committed Sep 4, 2020
1 parent b6ca3c3 commit 682555f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions demos/src/color-mixer/color-mixer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getContrastRatio } from '../shared/contrast-ratio';
import { getHexValues, mixHexes } from '../shared/colors-mix';
import { getContrastRatio } from '../shared/contrast-ratio.js';
import { getHexValues, mixHexes } from '../shared/colors-mix.js';

document.addEventListener('o.DOMContentLoaded', function() {
const forms = document.forms;
Expand Down
4 changes: 2 additions & 2 deletions demos/src/contrast-checker/contrast-checker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getContrastRatio, getWCAGRating } from '../shared/contrast-ratio';
import { getHexValues, mixHexes } from '../shared/colors-mix';
import { getContrastRatio, getWCAGRating } from '../shared/contrast-ratio.js';
import { getHexValues, mixHexes } from '../shared/colors-mix.js';

document.addEventListener('o.DOMContentLoaded', () => {
const form = document.forms[0];
Expand Down

0 comments on commit 682555f

Please sign in to comment.