-
Notifications
You must be signed in to change notification settings - Fork 27.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make styled-jsx configurable #3050
Make styled-jsx configurable #3050
Conversation
@timneutkens ok I looked into this and unfortunately we need to resolve the plugins paths: function styledJsxOptions(opts) {
if (!opts) return {}
if (!Array.isArray(opts.plugins)) return opts
opts.plugins = opts.plugins.map(plugin => {
if (Array.isArray(plugin)) {
return [
require.resolve(plugin[0]),
plugin[1]
]
}
return require.resolve(plugin)
})
return opts
} [require.resolve('styled-jsx/babel'), styledJsxOptions(opts['styled-jsx'])] |
Okay, lets move it to next.config.js then 👍 Since babelrc doesn't support javascript |
@timneutkens your call, my example would work in |
@giuseppeg oh right, can simply use that and allow the user to use pretty names 😄 👍 Will add it later 👌 |
@timneutkens if you want I can add the changes to this branch |
@giuseppeg no worries I'll add them 👍 |
…re-styled-jsx # Conflicts: # package.json # yarn.lock
* Make styled-jsx configurable * Add styled-jsx-plugin-postcss example * Add styled-jsx 2.1.0 with plugins support * Move examples around and add description * Add link to new example
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
For the upcoming plugins in v2 vercel/styled-jsx#291. Continuation of #2991