- React
- TypeScript
- Antd
- Parcel
- Less
npm install
npm run dev
npm run build
or
yarn
yarn dev
yarn build
Visit http://localhost:1234
Use antd with parcel
npm install
npm run dev
npm run build
or
yarn
yarn dev
yarn build
Visit http://localhost:1234
using .lessrc
with parcel doesn't work
{
"modifyVars": {
"@primary-color": "#1DA57A"
}
}
is there any other way to do it?
Tried to run the project with npm install
and npm start
and I get this error:
Server running at http://localhost:1234
🚨 /Users/vsorokin/ws/stuff/parcel-antd/index.js: Conflicting babel versions found in .babelrc. Make sure all of your plugins and presets depend on the same major version of babel.
I tried to update all of the packages to the latest, even used
"@babel/preset-env": "7.5.5",
"@babel/preset-react": "7.0.0",
"@ant-design/icons": "^4.3.0",
"antd": "^4.9.4",
import { SettingOutlined } from '@ant-design/icons';
// ...
const App = () => {
return (
<SettingOutlined />
)
}
The command npm run dev
works.
After npm run build
, then serve dist
.
The page will go wrong.
Uncaught TypeError: Cannot read property 'TinyColor' of undefined
import React from 'react';
import ReactDOM from 'react-dom';
import { Button ,DatePicker} from 'antd';
import moment from 'moment';
const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
ReactDOM.render(
<div>
<Button type="primary">Button</Button>
<DatePicker defaultValue={moment('2015-01-01', 'YYYY-MM-DD')} />
</div>
, document.getElementById('mountNode'));
console show that:
moment.isMoment is not a function
antd.less: Inline JavaScript is not enabled. Is it set in your options?
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
how to config with typescript?
Antd upgrade to v4 and I get warning Inline JavaScript is not enabled. Is it set in your options?
.
How to use parcel and antd?
> [email protected] start /home/xxx/xxx/xxx/parcel-antd
> parcel index.html --no-cache
Server running at http://localhost:1234
⏳ Building _iter-step.js...
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] requires a peer of react@>=16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@>=16.0.0 but none is installed. You must install peer dependencies yourself.
+ [email protected]
🚨 /home/xxx/xxx/xxx/parcel-antd/node_modules/antd/es/style/index.npm WARN [email protected] requires a peer of react@>=16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@>=16.0.0 but none is installed. You must install peer dependencies yourself.
+ [email protected]
added 66 packages in 14.734s
index.js: Conflicting babel versions found in .babelrc. Make sure all of your plugins and presets depend on the same major version of babel
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.