Move postcss plugin back into monorepo#393
Conversation
workflow: benchmarks/sizeComparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.
|
workflow: benchmarks/perf (native)Comparison of performance test results, measured in operations per second. Larger is better.
|
|
@javascripter Are you open to transferring the npm package name so I can publish this package in sync with RSD going forward? |
@necolas Yes no problem transferring |
|
Just @necolas for now please. Thanks! |
|
@necolas Sent an invite! |
Allows for configuration to be simplified, and avoids confusing need to mix react-strict-dom and stylex names.
d8de21e to
d9a71ff
Compare
|
|
||
| // Determines if the source code should be transformed | ||
| function shouldTransform(sourceCode) { | ||
| return sourceCode.includes('react-strict-dom'); |
There was a problem hiding this comment.
Is there an edge case where some files without react-strict-dom string must still be transformed due to variables?
Something like the below:
src/index.ts:
import { colors } from './vars.stylex';
import { Text } from './text';
// No direct react-strict-dom imports, but still needs transformations due to vars?
export default function App() {
return <Text color={colors.primary}>Hello</Text>
}src/text.tsx:
import { html , css } from 'react-strict-dom';
export function Text({ color, style, ...props} ) {
return <html.div style={[styles.text(color), style]} {...props} />
}
const styles = css.create({
text: (color) => ({
color
})
})src/vars.stylex.ts:
import { css } from 'react-strict-dom'
export const colors = stylex.defineVars({
primary: 'green'
});There was a problem hiding this comment.
I think the variable files are processed based on their name rather than being imported. But we can include this pattern in the test app to know for sure
Allows for configuration to be simplified, and avoids confusing need to mix react-strict-dom and stylex names.