⚠️ Poi has been deprecated, please migrate toVite,contact me personally if you need help.
Poi is a bundler built on the top of webpack, trying to make developing and bundling apps with webpack as easy as possible.
The Poi project is supported by ourBackersand funded throughPatreon.
- 📦 Out of box support for JS, CSS, File assets and more.
- ⚛ Framework-agnostic but also support JSX, Vue and more with no configs.
- 🔌 Great extensibility.
- 🐙 Fits most web apps, npm libs.
- 🚨 Great development experience.
Before we get started, ensure that you have installed Node.js (>=8) and Yarn (or npm) on your machine.
yarn global add create-poi-app
create-poi-app my-app
cdmy-app
npm run dev
Then openhttp://localhost:4000to see your app.
When you’re ready to deploy to production, create a minified bundle withnpm run build
.
Inside an empty project, runyarn init
ornpm init
to create apackage.json
and install Poi:
yarn init
yarn add poi --dev
Now all you need is to create an entry file, like if you're building a website, just create anindex.js
:
constel=document.createElement('div')
el.textContent='Hello Poi!'
document.body.appendChild(el)
Now if you run:
yarn poi --serve
You will get a URL likehttp://localhost:4000
which you can open to preview the app.
Next let's start adding some dependencies like a CSS filestyle.module.css
:
.title{
color:pink;
}
importstylesfrom'./style.module.css'
constel=document.createElement('div')
el.className=styles.title
el.textContent='Hello Poi!'
document.body.appendChild(el)
Save it and the browser will automatically reload to apply the changes!
You can improve it by sending pull requests tothis repository.
Check outthis repositoryfor more examples.
All feedback and suggestions are welcome!
- 💬 Join the community onSpectrum.
- 📣 Stay up to date on new features and announcements onTwitter @poi__js.
Poi v12 wouldn't exist without the inspirations from following projects:
- Webpack
- Parcel 2
- Poi itself
- Vue CLI 3
- Create React App
MIT ©EGOIST