Skip to content

Commit

Permalink
Update configuration: webpack, eslint and babel
Browse files Browse the repository at this point in the history
  • Loading branch information
zourdyzou committed Jun 27, 2022
1 parent 0ea2981 commit a774d47
Show file tree
Hide file tree
Showing 32 changed files with 17,320 additions and 5,605 deletions.
391 changes: 383 additions & 8 deletions .eslintrc.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .idea/jsLinters/eslint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 40 additions & 2 deletions babel.config.js
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,
},
],
],
};
};
24 changes: 18 additions & 6 deletions bin/App.js
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;
Loading

0 comments on commit a774d47

Please sign in to comment.