Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Can't load CSS modules from node modules #112

Closed
rorticus opened this issue Mar 30, 2017 · 0 comments · Fixed by #230
Closed

Can't load CSS modules from node modules #112

rorticus opened this issue Mar 30, 2017 · 0 comments · Fixed by #230

Comments

@rorticus
Copy link
Contributor

rorticus commented Mar 30, 2017

Bug

It looks like you can't build code that imports CSS modules that aren't in the src/ directory. I think it's a problem with src/loaders/css-module-dts-loader/loader.ts#getCssImport.

This was discovered while looking into dojo/meta#138 .

Code

import * as localStyles from './some/local/file.m.css';
import * as foreignStyles from '@dojo/widgets/common/styles/base.m.css';

You can error when running dojo build.

Expected behavior:

I expect it to build 😄

Actual behavior:

(node:28421) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, stat '/Users/rorymulligan/Desktop/dojo2/examples/todo-mvc/src/@dojo/widgets/common/base.m.css
@dylans dylans added this to the 2017.04 milestone Apr 8, 2017
@dylans dylans added the beta2 label Apr 8, 2017
@dylans dylans modified the milestones: 2017.04, 2017.05 Apr 29, 2017
@mwistrand mwistrand self-assigned this May 10, 2017
@eheasley eheasley modified the milestones: 2017.05, 2017.06 Jun 6, 2017
@dylans dylans modified the milestones: 2017.06, 2017.07 Jul 4, 2017
@maier49 maier49 mentioned this issue Jul 25, 2017
3 tasks
@dylans dylans modified the milestones: 2017.08, 2017.07 Jul 29, 2017
@kitsonk kitsonk added beta3 bug and removed beta2 labels Aug 1, 2017
@kitsonk kitsonk modified the milestones: 2017.08, 2017.09 Sep 4, 2017
@kitsonk kitsonk modified the milestones: 2017.09, 2017.10 Oct 6, 2017
@kitsonk kitsonk added the beta4 label Oct 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants