Skip to content

Releases: antonybudianto/cra-universal

v3.2.0

14 Jul 15:19
Compare
Choose a tag to compare
  • Experimental: Implement multiview for start command (#60) a0eecaf
    • Now you can start both client and server with start command!
      npx cra-universal start --both
  • docs: add meta google verif 73a51b3
  • add np flags d55e5f4

screen shot 2018-07-14 at 9 59 23 pm

v3.1.1

13 Jul 12:51
Compare
Choose a tag to compare
  • Fixed wrong client path on template server

v3.1.0

08 Jul 11:03
Compare
Choose a tag to compare
  • 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

04 Jul 13:15
Compare
Choose a tag to compare
  • 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

02 Jul 12:21
Compare
Choose a tag to compare
  • Now you can use object spread syntax on your crau.config.js (Node >= 8.6 already supported it)

New cra-universal 3.0.0

30 Jun 11:20
Compare
Choose a tag to compare

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!
  • 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 add env and react presets!
    • You must have index.js here
    • You can still use @cra-express/core package, the default server also used this one
  • 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)
      }

Breaking changes

  • Old init, start, build, and clean 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 use npx (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.json
    • server/yarn.lock
  • You can keep server/src
  • You must have index.js file inside server folder, which you can grab from server/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

19 Jun 00:48
Compare
Choose a tag to compare
  • Update webpack config so babel-loader handles jsx files (#49) (@mbrakken )
  • CLI dependency update

2.1.0

19 Apr 11:48
Compare
Choose a tag to compare
  • Dependencies update
  • Webpack 4! yeay

v2.0.0

22 Dec 11:14
Compare
Choose a tag to compare
  • Template server now use cross-env
  • Use latest @cra-express packages
  • Dependencies update