Releases: c8r/x0
Releases · c8r/x0
v6.0.0
API Changes
- Support for nested routes
- Adds support for
.mdfiles, using MDX - Configurable default styles for markdown and MDX files
- Adds LiveEditor and LivePreview capabilities to markdown
- Adds
--matchoption for filtering files - Adds
ignoreoption for pages - Optional SidebarLayout component
- Optional Library component
- Support for 404 pages
Internal Changes
- Uses mdx loader for md/mdx/jsx files
Breaking Changes
- Specifying scope in JSX front matter is no longer supported
- Removes support for glamor and glamorous static CSS extraction
- Previously undocumented
appoption is no longer used
Bug fix
v5.0.0
What's New
- x0 now accepts a folder of components as the entry argument
- Automatic routing based on filename
- Dev server uses webpack-serve under the hood
- Uses mini-html-webpack-plugin
- Default HTML head contents for UTF-8 charset and viewport meta tag
- Minimal base CSS styling
- Rendering the
<head>in the component is no longer supported - Webpack is used both for the client and static rendering, enabling webpack features in
getInitialProps - Support for babel-plugin-macros
- Default props can no longer be passed through the
package.jsonconfig - The
routesarray inpackage.jsonis no longer supported - Adding react-router is no longer necessary
- Removes react-loadable support
- Proxy option is no longer supported, but can be configured with a custom webpack config
- Automatically looks for a
webpack.config.jsfile in the directory - The
--configflag has been renamed to--webpack - Automatic support for styled-components
- Automatic support for emotion
- Custom HTML template option
- Supports custom App component to wrap all routes
- Support for JSX file format
- Support for MDX file format
Migrating from v4
- A directory should be passed to the x0 command, instead of a single file
- React router is not necessary for routing
- The
routesoption is no longer supported - HTML head contents should be removed from components
- Viewport and charset meta tags are included by default
- Use the custom template option or head options to populate HTML head contents
- Default props set in options should be added to the components
- Custom usage of react-loadable will require additional setup
- The
--configflag should be renamed to--webpack - The
proxyoption is no longer supported - The
cssLibraryoption is no longer required - Support for automatic static rendering with
glamor,glamorous, andfelais no longer supported - The
getInitialPropsmethod'spathnameargument has be renamed topath - The
getInitialPropsmethod only receives thepathargument, all other arguments are deprecated