christianalfoni / webpack-bin

A webpack code sandbox
http://www.webpackbin.com
MIT License
710 stars 75 forks source link

Importing npm package stylesheet doesn't work #161

Closed n1k0 closed 7 years ago

n1k0 commented 8 years ago

I may be doing something wrong here, but I can't import a CSS stylesheet from an npm package while enabling CSS modules support. For example with the bootstrap package being successfully added from the Configure section of the bin:

import "bootstrap/dist/css/bootstrap.css";

I'm getting this error:

ERROR: ModuleNotFoundError Module not found: Error: Cannot resolve module 'bootstrap/dist/css/bootstrap.css' in /api/sandbox/14681398575162110

The file exists, is part of the published package contents, and this import works just fine with a standard setup of webpack and CSS modules; is this a bug? Or what should I do in order to actually load this stylesheet?

Thanks for the awesome product btw.

Everettss commented 8 years ago

Here is example in webpackbin showing this problem: http://www.webpackbin.com/4yA99vdwW

kongakong commented 7 years ago

@Everettss The url to the webpackbin has become invalid. Could you outline the solution?

christianalfoni commented 7 years ago

@n1k0 @Everettss @kongakong We deployed an updated packager service yesterday. It has changed the alghoritm for entry points. The way bootstrap was organizing the published code crashed with the current approach. It should work now :-)