-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update configuration: webpack, eslint and babel
- Loading branch information
Showing
32 changed files
with
17,320 additions
and
5,605 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,41 @@ | ||
module.exports = { | ||
presets: ["@babel/preset-env", "@babel/preset-typescript", "@babel/preset-react"], | ||
/* eslint-env node */ | ||
|
||
module.exports = (api) => { | ||
const isTest = api.env("test"); | ||
const isDev = api.env("development"); | ||
return { | ||
plugins: [...(isDev ? ["react-refresh/babel"] : [])], | ||
presets: [ | ||
[ | ||
"@babel/env", | ||
{ | ||
bugfixes: true, | ||
useBuiltIns: "usage", | ||
corejs: 3, | ||
shippedProposals: true, | ||
...(isTest | ||
? { | ||
targets: { | ||
node: "current", | ||
}, | ||
} | ||
: {}), | ||
}, | ||
], | ||
[ | ||
"@babel/react", | ||
{ | ||
useBuiltIns: true, | ||
runtime: "automatic", | ||
}, | ||
], | ||
[ | ||
"@babel/typescript", | ||
{ | ||
allowDeclareFields: true, | ||
onlyRemoveTypeImports: true, | ||
}, | ||
], | ||
], | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,31 @@ | ||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
value: true, | ||
}); | ||
exports["default"] = void 0; | ||
|
||
var _react = _interopRequireDefault(require("react")); | ||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : { default: obj }; | ||
} | ||
|
||
var App = function App() { | ||
return /*#__PURE__*/_react["default"].createElement("div", { | ||
className: "App-container" | ||
}, /*#__PURE__*/_react["default"].createElement("p", null, "Edit ", /*#__PURE__*/_react["default"].createElement("code", null, "src/app.tsx"), " and save to reload the browser")); | ||
return /*#__PURE__*/ _react["default"].createElement( | ||
"div", | ||
{ | ||
className: "App-container", | ||
}, | ||
/*#__PURE__*/ _react["default"].createElement( | ||
"p", | ||
null, | ||
"Edit ", | ||
/*#__PURE__*/ _react["default"].createElement("code", null, "src/App.tsx"), | ||
" and save to reload the browser" | ||
) | ||
); | ||
}; | ||
|
||
var _default = App; | ||
exports["default"] = _default; | ||
exports["default"] = _default; |
Oops, something went wrong.