mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
lazy-load antd resources
This commit is contained in:
parent
9f61d38bf1
commit
be60e41fe8
5 changed files with 17 additions and 20 deletions
9
src/FilterLists.Web.V2/config-overrides.js
Normal file
9
src/FilterLists.Web.V2/config-overrides.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
const { override, fixBabelImports } = require('customize-cra');
|
||||
|
||||
module.exports = override(
|
||||
fixBabelImports('import', {
|
||||
libraryName: 'antd',
|
||||
libraryDirectory: 'es',
|
||||
style: 'css',
|
||||
}),
|
||||
);
|
||||
BIN
src/FilterLists.Web.V2/package-lock.json
generated
BIN
src/FilterLists.Web.V2/package-lock.json
generated
Binary file not shown.
|
|
@ -8,15 +8,18 @@
|
|||
"@types/react": "16.8.24",
|
||||
"@types/react-dom": "16.8.5",
|
||||
"antd": "^3.21.0",
|
||||
"babel-plugin-import": "^1.12.0",
|
||||
"customize-cra": "^0.4.1",
|
||||
"react": "^16.8.6",
|
||||
"react-app-rewired": "^2.1.3",
|
||||
"react-dom": "^16.8.6",
|
||||
"react-scripts": "3.0.1",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"start": "react-app-rewired start",
|
||||
"build": "react-app-rewired build",
|
||||
"test": "react-app-rewired test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"proxy": "https://filterlists.com",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
@import "~antd/dist/antd.css";
|
||||
|
||||
.App {
|
||||
text-align: center;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,11 @@
|
|||
import React from 'react';
|
||||
import logo from './logo.svg';
|
||||
import './App.css';
|
||||
import { Button } from 'antd';
|
||||
|
||||
const App: React.FC = () => {
|
||||
return (
|
||||
<div className="App">
|
||||
<header className="App-header">
|
||||
<img src={logo} className="App-logo" alt="logo" />
|
||||
<p>
|
||||
Edit <code>src/App.tsx</code> and save to reload.
|
||||
</p>
|
||||
<a
|
||||
className="App-link"
|
||||
href="https://reactjs.org"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Learn React
|
||||
</a>
|
||||
</header>
|
||||
<Button type="primary">Button</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue