Upgrade 0.39 to 0.40

Change startupjs and all @startupjs/* dependencies in your package.json to ^0.40.

BREAKING CHANGES

Upgrade web client and server compilation in dev and in production from Webpack 4 to Webpack 5.

Notes about how to upgrade to v0.40.0:

  1. You can't use named imports from .json files anymore. Instead import the whole json file and then do the manual destructuring:
// OLD
import { BORDER_WIDTH, STRIPE_PUBLIC_KEY } from './constants.json'

// NEW
import CONSTANTS from './constants.json'
const { BORDER_WIDTH, STRIPE_PUBLIC_KEY } = CONSTANTS
  1. Webpack 5 changed the way it parses modules to use ESM modules wherever possible. Because of this some default imports from old CommonJS modules might be imported not directly but inside the .default field.

If you receive errors from React that it can't render something because it received an object -- this probably means that you need to get your default import from .default field manually:

// OLD
import DrawerLayout from 'react-native-drawer-layout-polyfill'

// NEW
import DrawerLayoutModule from 'react-native-drawer-layout-polyfill'
const DrawerLayout = DrawerLayoutModule.default || DrawerLayoutModule

Same goes for errors like object is not a function when your default import is actually expected to be a function. You'll have to do the same trick as above.