We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b32ef05 commit 09253ebCopy full SHA for 09253eb
src/lib/twConfigParser.js
@@ -2,8 +2,9 @@ import flattenColorPalette from 'tailwindcss/lib/util/flattenColorPalette'
2
import resolveConfig from 'tailwindcss/resolveConfig'
3
4
export default (configStr) => {
5
- const config = eval(configStr)
6
- return resolveConfig(config)
+ configStr = configStr.replace(/module.exports = /, '')
+ /* eslint-disable-next-line */
7
+ return resolveConfig(Function('return (' + configStr + ')')())
8
}
9
10
export const transformThemeForCanvas = ({ theme }) => {
0 commit comments