support esm

This commit is contained in:
Nebel 2022-02-18 13:17:48 +09:00
parent cb86323913
commit 997b123506
6 changed files with 2669 additions and 4545 deletions

3
babel.config.json Normal file
View file

@ -0,0 +1,3 @@
{
"presets": ["@parcel/babel-preset"]
}

View file

@ -3,13 +3,15 @@
"version": "1.0.0",
"private": true,
"license": "CC0-1.0",
"type": "module",
"scripts": {
"test": "jest",
"start": "parcel index.html --open",
"build": "parcel build index.html"
},
"devDependencies": {
"jest": "^27.0.6",
"parcel": "^2.0.0-beta.3.1"
"@parcel/babel-preset": "^2.0.0-alpha.2",
"jest": "^27.5.1",
"parcel": "^2.3.1"
}
}

4
renovate.json Normal file
View file

@ -0,0 +1,4 @@
{
"extends": ["config:base", "config:semverAllMonthly"],
"automerge": true
}

View file

@ -1,6 +1,5 @@
/** @license https://github.com/facebook/jest/blob/master/LICENSE */
function sum(a, b) {
return a + b;
}
module.exports = sum;
export default sum;

View file

@ -1,7 +1,5 @@
/** @license https://github.com/facebook/jest/blob/master/LICENSE */
import sum from "./sum";
const sum = require("./sum");
test("adds 1 + 2 to equal 3", () => {
test("1 と 2 の合計は 3", () => {
expect(sum(1, 2)).toBe(3);
});

7190
yarn.lock

File diff suppressed because it is too large Load diff