[example] Replace CRA with simple manual setup

This commit is contained in:
Eloy Durán 2021-09-23 17:08:50 +02:00
Родитель b897da2b54
Коммит 89e4b0dcec
9 изменённых файлов: 672 добавлений и 6458 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -1,6 +1,7 @@
node_modules
lib
.tsbuildinfo
dist
# This is purely pre-cautionary; when linting becomes slow, delete this eslintcache entry
.eslintcache

23
examples/apollo-watch-fragments/.gitignore поставляемый
Просмотреть файл

@ -1,23 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

Просмотреть файл

@ -10,14 +10,11 @@
"graphql": "^15.6.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"typescript": "^4.1.2",
"web-vitals": "^1.0.1"
"typescript": "^4.1.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"eject": "react-scripts eject"
"start": "webpack serve --open",
"build": "webpack"
},
"eslintConfig": {
"extends": [
@ -35,5 +32,11 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"ts-loader": "^9.2.6",
"webpack": "^5.53.0",
"webpack-cli": "^4.8.0",
"webpack-dev-server": "^4.2.1"
}
}

Просмотреть файл

@ -17,5 +17,6 @@
<p>Created by <a href="http://todomvc.com">you</a></p>
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</footer>
<script src="bundle.js"></script>
</body>
</html>

Просмотреть файл

@ -1,9 +0,0 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});

Просмотреть файл

@ -1,11 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
@ -17,10 +13,8 @@
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
"jsx": "react",
"sourceMap": true
},
"include": [
"src"
]
"include": ["src"]
}

Просмотреть файл

@ -0,0 +1,27 @@
const path = require("path");
module.exports = {
mode: "development",
entry: "./src/index.tsx",
devtool: "inline-source-map",
devServer: {
static: "./public",
},
stats: "minimal",
module: {
rules: [
{
test: /\.tsx?$/,
use: "ts-loader",
exclude: /node_modules/,
},
],
},
resolve: {
extensions: [".tsx", ".ts", ".js"],
},
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "public"),
},
};

Просмотреть файл

@ -3134,9 +3134,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001181:
version "1.0.30001191"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001191.tgz#bacb432b6701f690c8c5f7c680166b9a9f0843d9"
integrity sha512-xJJqzyd+7GCJXkcoBiQ1GuxEiOBCLQ0aVW9HMekifZsAVGdj5eJ4mFB9fEhSHipq9IOk/QXFJUiIr9lZT+EsGw==
version "1.0.30001260"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001260.tgz"
integrity sha512-Fhjc/k8725ItmrvW5QomzxLeojewxvqiYCKeFcfFEhut28IVLdpHU19dneOmltZQIE5HNbawj1HYD+1f2bM1Dg==
capture-exit@^2.0.0:
version "2.0.0"

7034
yarn.lock

Разница между файлами не показана из-за своего большого размера Загрузить разницу