Skip to content

fix: do not return the userConfigPath if its null - #4773

Merged
adamwathan merged 1 commit into
tailwindlabs:masterfrom
schelmo:master
Jun 23, 2021
Merged

fix: do not return the userConfigPath if its null#4773
adamwathan merged 1 commit into
tailwindlabs:masterfrom
schelmo:master

Conversation

@schelmo

@schelmo schelmo commented Jun 23, 2021

Copy link
Copy Markdown
Contributor

This prevents adding a null config path to the postcss dependencies.
It happens when you use a config object instead of a config file with watch in jit mode with postcss-cli.

// postcss.config.js
module.exports = {
  plugins: [
    require('tailwindcss')({
      mode: 'jit', 
      purge: ['./src/**/*'],
      theme: {/**/}
    })
  ]
}
TAILWIND_MODE=watch yarn postcss --watch ./src/css/* --dir ./public/css/

->
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null

@adamwathan
adamwathan merged commit 973d53d into tailwindlabs:master Jun 23, 2021
@adamwathan

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants