Zero-config Laravel Mix extension that enables Emotion styled components.
-
yarn add -D laravel-mix-emotion
-
Add
require('laravel-mix-emotion')
to yourwebpack.mix.js
config file. Initialize usingmix.emotion()
.
laravel-mix-emotion
takes a single (optional) config param passed when initializing the extension: emotionFormat
. This allows you to specify formatting instructions for Emotion generated classnames.
mix.emotion({
emotionFormat: '[local]',
})