Skip to content
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

dts loader uses presence of src/ in directory path to determine whether to modify files #369

Closed
maier49 opened this issue Jan 22, 2020 · 1 comment · Fixed by dojo/webpack-contrib#244
Assignees

Comments

@maier49
Copy link
Contributor

maier49 commented Jan 22, 2020

Bug

Package Version:

Expected behavior:

Style .dts files for external dependencies should not be modified, regardless of where the file lives

Actual behavior:
They are modified

@msssk
Copy link

msssk commented Jan 22, 2020

Correct me if I'm wrong @maier49, but just trying to add some clarity - this is related to CSS module .d.ts files being overwritten, right?

What's happening is that during a build for an application that uses @dojo/widgets some of the CSS module .d.ts files in node_modules/@dojo/widgets are being regenerated. I would think this should never happen; in my case it's worse because the files are being overwritten with no content, so I'm left with empty .d.ts files which breaks subsequent builds.

The reason it happens is because the build tool does a simple check for src anywhere within the CSS file's path, intending to only match project/src/**/*.m.css. Unfortunately this also matches src/project/**/*.m.css, including src/project/node_modules/@dojo/widgets/**/*.m.css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants