Releases: antonybudianto/cra-universal
Releases · antonybudianto/cra-universal
v3.2.0
v3.1.1
- Fixed wrong client path on template server
v3.1.0
- Config:
watchOptions
is now configurable - Clear console every rebuild
- Dependencies update
- css-loader@1.0.0 requires Node 6.9, I recommend 8 if possible
v3.0.2
- Better log message ordering
- use exact version of sswp instead of "beta" tag
- Fix build output print color (too contrast)
- Put hot update files into
.hot
folder for tidiness
v3.0.1
- Now you can use object spread syntax on your
crau.config.js
(Node >= 8.6 already supported it)
New cra-universal 3.0.0
Announcement
Hi,
New major release of cra-universal is out! 🎉🎉🎉🎉🎉🎉🎉
You can try it now by running:
# Create new cra
create-react-app myapp
cd myapp
# Install new cra-universal
yarn add -D cra-universal
# Start with no config at all!
npx cra-universal start
New
- Zero config by default!
- No
server
folder is required - Just run cra-universal start/build, and it's good!
- and still customizable, check Customization section!
- No
- HMR ready! Replaced nodemon with start-server-webpack-plugin
- Replaced null-loader with isomorphic-style-loader for css files
- Used url-loader for standard assets, you'll now get the asset loaded correctly. For hydration warning, you can disable them
- Now you don't need to list packages twice on client and server, just list them on main package.json, no
server/package.json
anymore - etc. (will add more later!)
Customization
While being zero config, you can still do customization
- You can still have
server
folder, it's optional- Please use
npx cra-universal init
to bootstrap this folder - You can have
.babelrc
here, just don't forget to addenv
andreact
presets! - You must have
index.js
here - You can still use
@cra-express/core
package, the default server also used this one
- Please use
- You can have
crau.config.js
, it's optional- It's used to configure the available options:
module.exports = { webpackPlugins: [], modifyWebpack: (config) => webpackMerge(config, myCustomConfig) }
- It's used to configure the available options:
Breaking changes
- Old
init
,start
,build
, andclean
commands are deprecated, they're replaced to new implementation, so they won't be compatible with old CLI - cra-universal should not be installed globally anymore. For
init
command, please usenpx
(bundled on npm >= 5.2)
Migration from 2.x.x
- You can remove following files since it's now zero config:
server/webpack.config.js
server/package.json
-> Please move all dependencies into CRA client package.jsonserver/yarn.lock
- You can keep
server/src
- You must have
index.js
file insideserver
folder, which you can grab fromserver/src
- For clientBuildPath, you can update the path since the build result is now changed:
// update to this const clientBuildPath = path.resolve(__dirname, '../client');
// old structure dist - build -> Your client and server build - client -> Your regular CRA client build // new structure dist - client -> CRA client build - server -> CRA server build
I had refactored docs
and templates
to use latest CLI, you can check them out if you want.
If you found any bugs or any ideas, please comment below!
P.S. Contributions are more appreciated.
2.1.1
2.1.0
- Dependencies update
- Webpack 4! yeay
v2.0.0
- Template server now use cross-env
- Use latest @cra-express packages
- Dependencies update