christianalfoni / webpack-bin

A webpack code sandbox

Home Page:http://www.webpackbin.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Importing npm package stylesheet doesn't work

n1k0 opened this issue · comments

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.

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

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

@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 :-)