Top Related Projects
Set up a modern web app by running one command.
A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
The zero configuration build tool for the web. 📦🚀
Create and build modern JavaScript projects with zero initial configuration.
Quick Overview
Poi is a zero-config bundler for JavaScript applications. It aims to provide a simple and fast development experience, with built-in support for modern web technologies and minimal configuration required.
Pros
- Zero-config setup for quick project initialization
- Built-in support for TypeScript, CSS, and various file formats
- Hot module replacement for faster development
- Extensible plugin system for customization
Cons
- Limited documentation compared to more established bundlers
- Smaller community and ecosystem compared to webpack or Rollup
- May not be suitable for highly complex or specialized build requirements
- Less frequent updates and maintenance compared to more popular alternatives
Code Examples
- Basic usage with React:
// index.js
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
ReactDOM.render(<App />, document.getElementById('root'))
- Using CSS modules:
// Button.js
import styles from './Button.module.css'
export default function Button({ children }) {
return <button className={styles.button}>{children}</button>
}
- Configuring Poi:
// poi.config.js
module.exports = {
entry: 'src/index.js',
output: {
dir: 'dist',
publicUrl: '/assets/'
},
plugins: [
{
resolve: '@poi/plugin-typescript'
}
]
}
Getting Started
- Install Poi:
npm install -g poi
- Create a new project:
mkdir my-project && cd my-project
npm init -y
npm install react react-dom
- Create an entry file (e.g.,
src/index.js
):
import React from 'react'
import ReactDOM from 'react-dom'
ReactDOM.render(<h1>Hello, Poi!</h1>, document.getElementById('root'))
- Run the development server:
poi --serve
Your app will be available at http://localhost:4000
.
Competitor Comparisons
Set up a modern web app by running one command.
Pros of Create React App
- Extensive documentation and community support
- Seamless integration with React ecosystem
- Regular updates and maintenance by Facebook
Cons of Create React App
- Less flexible configuration options out-of-the-box
- Larger bundle size for simple projects
- Ejecting required for advanced customization
Code Comparison
Create React App:
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById('root'));
Poi:
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById('app'));
Key Differences
- Poi offers more flexibility in configuration without ejecting
- Create React App provides a more opinionated setup
- Poi supports multiple frameworks, while Create React App is React-specific
- Create React App has a larger ecosystem of tools and plugins
- Poi aims for simplicity and faster build times
Use Cases
-
Choose Create React App for:
- Beginners learning React
- Projects that align with its default configuration
- Teams that prefer a widely adopted, well-supported tool
-
Consider Poi for:
- Developers who need more configuration flexibility
- Projects using multiple frameworks
- Smaller applications where build performance is crucial
A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
Pros of webpack
- Highly configurable and flexible, allowing for complex build setups
- Extensive ecosystem with a wide range of plugins and loaders
- Strong community support and regular updates
Cons of webpack
- Steeper learning curve, especially for beginners
- Configuration can be complex and verbose
- Slower build times for large projects compared to poi
Code Comparison
webpack configuration:
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
module: {
rules: [
{ test: /\.js$/, use: 'babel-loader' },
],
},
};
poi configuration:
module.exports = {
entry: './src/index.js',
output: {
html: {
title: 'My App',
},
},
};
webpack offers more granular control over the build process, allowing developers to specify detailed configurations for various aspects of the build. On the other hand, poi provides a simpler, more opinionated configuration that requires less setup out of the box.
While webpack's flexibility is powerful for complex projects, poi's simplicity makes it easier to get started quickly, especially for smaller projects or developers new to build tools. However, poi may lack some advanced features and customization options that webpack provides.
The zero configuration build tool for the web. 📦🚀
Pros of Parcel
- Zero configuration out of the box, making it easier for beginners
- Faster build times due to its multi-core processing capabilities
- Supports a wider range of file types and assets without additional plugins
Cons of Parcel
- Less flexibility and customization options compared to Poi
- Larger bundle sizes in some cases, which may impact performance
- Limited plugin ecosystem compared to Webpack-based bundlers like Poi
Code Comparison
Parcel:
// No configuration file needed
// Just run: parcel index.html
Poi:
// poi.config.js
module.exports = {
entry: 'src/index.js',
output: {
dir: 'dist',
publicUrl: '/'
}
}
Both Parcel and Poi aim to simplify the bundling process, but they take different approaches. Parcel focuses on zero-configuration and ease of use, while Poi offers more customization options built on top of Webpack. Parcel is ideal for quick prototypes and smaller projects, whereas Poi might be better suited for larger, more complex applications that require fine-tuned control over the build process.
Create and build modern JavaScript projects with zero initial configuration.
Pros of Neutrino
- More flexible and customizable build configuration
- Supports a wider range of project types (React, Vue, Node.js, etc.)
- Extensive middleware ecosystem for easy extensibility
Cons of Neutrino
- Steeper learning curve due to its more complex architecture
- Requires more setup and configuration compared to Poi's simpler approach
- Less active development and community support in recent years
Code Comparison
Neutrino configuration:
module.exports = {
use: [
'@neutrinojs/react',
'@neutrinojs/jest',
['@neutrinojs/eslint', {
eslint: {
rules: {
'react/prop-types': 'off'
}
}
}]
]
};
Poi configuration:
module.exports = {
entry: './src/index.js',
plugins: [
require('@poi/plugin-react')(),
require('@poi/plugin-eslint')()
]
};
Neutrino offers more granular control over configuration, while Poi provides a simpler, more opinionated setup. Neutrino's middleware system allows for more customization, but Poi's plugin system is more straightforward for basic use cases. Both tools aim to simplify webpack configuration, but they cater to different levels of complexity and customization needs.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
â ï¸ Poi has been deprecated, please migrate to Vite, 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 our Backers and funded through Patreon.
Features
- ð¦ 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.
Quick Overview
Before we get started, ensure that you have installed Node.js (>=8) and Yarn (or npm) on your machine.
Get Started Immediately
yarn global add create-poi-app
create-poi-app my-app
cd my-app
npm run dev
Then open http://localhost:4000 to see your app.
When youâre ready to deploy to production, create a minified bundle with npm run build
.
Get Started Manually
Inside an empty project, run yarn init
or npm init
to create a package.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 an index.js
:
const el = document.createElement('div')
el.textContent = 'Hello Poi!'
document.body.appendChild(el)
Now if you run:
yarn poi --serve
You will get a URL like http://localhost:4000
which you can open to preview the app.
Next let's start adding some dependencies like a CSS file style.module.css
:
.title {
color: pink;
}
import styles from './style.module.css'
const el = 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!
Documentation
ð https://poi.js.org
You can improve it by sending pull requests to this repository.
Check out this repository for more examples.
Community
All feedback and suggestions are welcome!
- ð¬ Join the community on Spectrum.
- ð£ Stay up to date on new features and announcements on Twitter @poi__js.
Credits
Poi v12 wouldn't exist without the inspirations from following projects:
- Webpack
- Parcel 2
- Poi itself
- Vue CLI 3
- Create React App
License
MIT © EGOIST
Top Related Projects
Set up a modern web app by running one command.
A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
The zero configuration build tool for the web. 📦🚀
Create and build modern JavaScript projects with zero initial configuration.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot