Fix build on Node.js 10

This commit is contained in:
Stéphan Kochen
2020-08-29 10:55:21 +02:00
parent 8d911ac7b0
commit 2681282af5
2 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -15,7 +15,8 @@ jobs:
with: with:
node-version: 10.x node-version: 10.x
- uses: actions/cache@v2 - name: Yarn cache
uses: actions/cache@v2
with: with:
path: .yarn/cache path: .yarn/cache
key: yarn-${{ hashFiles('yarn.lock') }} key: yarn-${{ hashFiles('yarn.lock') }}
+7 -3
View File
@@ -38,9 +38,13 @@ const compiler = webpack({
extensions: [`.mjs`, `.js`, `.ts`, `.tsx`, `.json`], extensions: [`.mjs`, `.js`, `.ts`, `.tsx`, `.json`],
}, },
externals: Object.fromEntries( externals: (() => {
EXTERNALS.map((name) => [name, `commonjs ${name}`]) const res = {};
), for (const name of EXTERNALS) {
res[name] = `commonjs ${name}`;
}
return res;
})(),
module: { module: {
rules: [ rules: [