Skip to content

Commit

Permalink
Fix error of plugins undefined
Browse files Browse the repository at this point in the history
In latest version of postcss and Tailwind, we are getting a error where "unshift of undefined" is thrown.
This fixes the error.
  • Loading branch information
ashokrajl authored Jun 6, 2021
1 parent 7ec846f commit f54c844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = (config, env, helpers) => {

const postCssLoaders = helpers.getLoadersByName(config, "postcss-loader");
postCssLoaders.forEach(({ loader }) => {
const plugins = loader.options.plugins;
const plugins = loader.options.postcssOptions.plugins;

// Add tailwind css at the top.
plugins.unshift(require("tailwindcss"));
Expand Down

0 comments on commit f54c844

Please sign in to comment.