-
Notifications
You must be signed in to change notification settings - Fork 509
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
Adding css-modules with a custom Rollup config breaks the build. #284
Comments
I dug inside the code, and from what I've seen, the issue started when, two weeks ago, @medelman17 added Here the change: bfc0590#diff-85d99c527c01407b9055b07762a4ad45L11 On my computer I just reverted the changes only on that file, and with the old configuration the build passes, but I really have no idea on how to fix using |
I played a little more and I found that if I use https://github.com/jaredpalmer/tsdx/blob/master/src/createRollupConfig.ts#L146 |
Last but not least, I found that probably the issue is not strictly related to Removing
.test {
color: red;
}
import * as React from 'react';
import './style.css';
// Delete me
export const Thing = () => {
return <div className="test">the snozzberries taste like snozzberries</div>;
}; |
do you mind retrying with v0.11? we reverted the change to @wessberg/rollup-plugin-ts. reopen if still persists. |
I can confirm @sw-yx, upgrading to v0.11 solves the issue. Thanks. |
Current Behavior
Create a new project with react template:
npx tsdx create mylib
postcss
plugin and extend Rollup config withtsdx.config.js
/src/style.module.css
, import and use it in/src/index.tsx
The build script exits with this error:
Suggested solution(s)
Apparently, the custom configuration added in
tsdx.config.js
is not interpreted and the parser doesn't seem to know how to manage the.test
css class instyle.module.css
.If you downgrade TSDX to
0.9.3
the build passes.This issue happens with TSDX >=
v0.10.0
Your environment
The text was updated successfully, but these errors were encountered: