Skip to content

Upgrading style-loader 1 to 2

Breaking1.3.0 → 2.0.0Breaking3

BreakingUpgrade verdict

3 breaking changes.

  • the esModule option is true by default, you need to change const locals = require('./styles.css')/require('./styles.css') on import locals from './styles.css'/import './styles.css''.
  • Removed support for loaders returning String instead of Array.
  • minimum supported Node.js version is 10.13.0.
3 items need code or config changes

Node.js requirement changed in 2.0.0: >= 8.9.0 → >= 10.13.0.

Breaking3
the esModule option is true by default, you need to change const locals = require('./styles.css')/require('./styles.css') on import locals from './styles.css'/import './styles.css''.
esModuletruerequire('./styles.css')
Removed support for loaders returning String instead of Array.
StringArray
minimum supported Node.js version is 10.13.0.
Node.js