Releases: egoist/poi
v12.0.0-beta.7
🔥🔥🔥 New Features 🔥🔥🔥
Custom Public Folder
Added --public-folder <folder>
and publicFolder
config option, serve static files in another folder instead of ./public
, can be turned off by setting to false
or --no-public-folder
Better support for multi-page application
Added pages
config option:
module.exports = {
pages: {
foo: './foo.js', // equivalent to { entry: './foo.js' }
bar: {
entry: string[] | string,
// and all options for html-webpack-plugin are supported
// `filename` is automatically set to `${entryName}.html` which is `bar.html` in this case
}
}
}
With above config, Poi will generate foo.html
and bar.html
.
When using pages
option, you won't be able to use entry
option.
Configure webpack directly
Instead of using chainWebpack you can provide an object or a function as the value of configureWebpack option:
module.exports = {
configureWebpack(config) {
config.resolve.alias.push('.mdx')
// optionally `return config`
},
// or object
// merged using `webpack-merge` module
configureWebpack: {
resolve: {
alias: ['.mdx']
}
}
}
Access Public URL
You can use process.env.PUBLIC_URL
to access webpackConfig.output.publicPath
in your app code, in HTML file, use envs.PUBLIC_URL
instead, e.g. <%= envs.PUBLIC_URL %>favicon.ico
v11.0.0-alpha.14
This is not really published on npm, lerna failed...
v10.0.0-rc.0
This might break things.
Option changes
See https://github.com/egoist/poi/blob/master/docs/options.md
Plugins
Presets are now Plugins, and the official ones are published under @poi
org on npm, e.g. @poi/plugin-storybook
10.0.0-beta.12
The first PUBLIC BETA release for Poi 10.
The new docs are here: https://github.com/egoist/poi/tree/x/docs (WIP)
Highlights:
- Webpack 4. Y'all know that this is coming.
- Simplified options. Some are removed, and some are renamed.
- Presets are now Plugins, and the official ones are published under
@poi
org on npm, eg:@poi/plugin-storybook
- No plugin is required for React, however you do need a custom
.babelrc
file for adding HMR support withreact-hot-loader
. - Automatically load
.env.{process.env.NODE_ENV}
file. - ...
Note that new packages are published under next
tag on npm, which means you can install Poi 10 by:
yarn add poi@next --dev
v10.0.0-alpha.0
Preview for Poi v10, bugs and crashes are expected 😅
Try it with:
yarn add poi@next --dev
Note that all presets are renamed to plugin
, eg. poi-preset-buble
is now poi-plugin-buble
Also there're some breaking changes in the plugin API, will add notes about it in following alpha versions.
v9.6.8
This release reverted the uglifyjs-webpack-plugin we added in previous release which could broken in some cases, I tested it with a codemirror and failed.
v9.6.3
Deprecate --component
in favor of --library
.
v9.6.0
v9.5.2
New features:
Added --component
flag to make bundling components in CommonJS or UMD format even easier. (doc)
Basically:
poi build --component
is equivalent topoi build --format cjs --no-html --no-sourceMap
poi build --component Vuex
is equivalent topoi build --format umd --module-name Vuex --no-html --no-sourceMap
--no-clear
is only needed for the screenshot to prevent from clearing console logs.