diff --git a/babel.config.json b/babel.config.json
index 013586968..fe53aefef 100644
--- a/babel.config.json
+++ b/babel.config.json
@@ -3,9 +3,7 @@
[
"@babel/preset-env",
{
- "targets": {
- "node": "12"
- },
+ "targets": "defaults, node >= 12",
"useBuiltIns": "usage",
"corejs": "3.25"
}
diff --git a/get/index.njk b/get/index.njk
index 89f5e6e21..7d0901018 100644
--- a/get/index.njk
+++ b/get/index.njk
@@ -18,11 +18,15 @@ Or, if you'd rather just have Color
as a global variable, the class
<script src="https://colorjs.io/dist/color.global.js"></script>
-You can also add .min
right before the .js
extension to get a minified file.
+
You can also add .min
right before the .js
extension to get a minified file.
You can also import individual functions and use the tree-shakeable API.
-To use with older platforms (e.g. Node.js 12 or 14), add .legacy
right before the .js
extension to get a transpiled version.
+To use with older browsers (e.g. Opera v89) or platforms (e.g. Node.js v12 or v14), add .legacy
right before the .js
extension to get a transpiled version:
+
+
const Color = require("colorjs.io/dist/color.legacy.cjs").default
+
+<script src="https://colorjs.io/dist/color.global.legacy.js"></script>