Skip to content

Commit 1faabc8

Browse files
committed
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.
1 parent 5e6bfb2 commit 1faabc8

File tree

9 files changed

+781
-782
lines changed

9 files changed

+781
-782
lines changed

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
/lib
22
/docs
3-
defaultConfig.js
3+
defaultConfig.stub.js

__tests__/importsConfig.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import config from '../defaultConfig.js'
33

44
test('it can accept a config file', () => {
55
tailwind('./defaultConfig.js')
6-
expect(tailwind.defaultConfig()).toEqual(config)
6+
expect(require('../defaultConfig.stub.js')).toEqual(config())
77
})

0 commit comments

Comments
 (0)