Fix build on Node.js 10
This commit is contained in:
@@ -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') }}
|
||||||
|
|||||||
@@ -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: [
|
||||||
|
|||||||
Reference in New Issue
Block a user