From 3e28e55be2ad5ebd4e18c2c0f151e2c392f5505b Mon Sep 17 00:00:00 2001 From: Juanjo Diaz Date: Mon, 22 Aug 2022 23:12:45 +0200 Subject: [PATCH] fix: pull CDN lodash from gh instead of npm so ti supports es6 imports --- build.js | 2 +- dist/cdn/plainjs/BaseParser.js | 2 +- dist/cdn/transforms/unwind.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.js b/build.js index 9b1a5fe..0e87539 100644 --- a/build.js +++ b/build.js @@ -28,7 +28,7 @@ const replaceDependenciesByJsdelivr = { const dependencies = { '@streamparser/json': 'https://cdn.jsdelivr.net/npm/@streamparser/json@0.0.8', - 'lodash.get': 'https://cdn.jsdelivr.net/npm/lodash.get@4.4.2/index.js' + 'lodash.get': '//cdn.jsdelivr.net/gh/lodash/lodash@master/get.js' }; build.onResolve({ namespace: 'file', filter: new RegExp(`(?:${Object.keys(dependencies).join('|')})`) }, (args) => { diff --git a/dist/cdn/plainjs/BaseParser.js b/dist/cdn/plainjs/BaseParser.js index 2cda5ec..94f37dd 100644 --- a/dist/cdn/plainjs/BaseParser.js +++ b/dist/cdn/plainjs/BaseParser.js @@ -1,5 +1,5 @@ // packages/plainjs/src/BaseParser.js -import lodashGet from "https://cdn.jsdelivr.net/npm/lodash.get@4.4.2/index.js"; +import lodashGet from "//cdn.jsdelivr.net/gh/lodash/lodash@master/get.js"; import defaultFormatter from "../formatters/default.js"; import numberFormatterCtor from "../formatters/number.js"; import stringFormatterCtor from "../formatters/string.js"; diff --git a/dist/cdn/transforms/unwind.js b/dist/cdn/transforms/unwind.js index 88340c2..7968980 100644 --- a/dist/cdn/transforms/unwind.js +++ b/dist/cdn/transforms/unwind.js @@ -1,5 +1,5 @@ // packages/transforms/src/unwind.js -import lodashGet from "https://cdn.jsdelivr.net/npm/lodash.get@4.4.2/index.js"; +import lodashGet from "//cdn.jsdelivr.net/gh/lodash/lodash@master/get.js"; import { setProp, unsetProp, flattenReducer } from "./utils.js"; function getUnwindablePaths(obj, currentPath) { return Object.keys(obj).reduce((unwindablePaths, key) => {