Switch to separate config import
Import default config from separate path (require('tailwindcss/defaultConfig')) to allow importing the default config without importing all of Tailwind, which causes errors with Webpack due to a dynamic require.
This commit is contained in:
parent
5e6bfb2f9e
commit
1faabc82b1
9 changed files with 781 additions and 782 deletions
|
|
@ -52,7 +52,7 @@ program
|
|||
process.exit(1)
|
||||
}
|
||||
|
||||
const output = fs.readFileSync(path.resolve(__dirname, '../defaultConfig.js'), 'utf8')
|
||||
const output = fs.readFileSync(path.resolve(__dirname, '../defaultConfig.stub.js'), 'utf8')
|
||||
fs.outputFileSync(destination, output.replace('// var defaultConfig', 'var defaultConfig'))
|
||||
console.log(`Generated Tailwind config: ${destination}`)
|
||||
process.exit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue