aurelia / loader-webpack

An implementation of Aurelia's loader interface to enable webpack.
MIT License
26 stars 10 forks source link

@noView not loading in Webpack #22

Closed JohnCampionJr closed 7 years ago

JohnCampionJr commented 7 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: @noView(['nprogress/nprogress.css']) seems to be ignore by the webpack loader. The resulting app fails to load trying to find nprogress.css

Workaround, inside matching html file solves this:

`

`

Expected/desired behavior:

niieani commented 7 years ago

This is not a bug, you are missing a build resource declaration (see http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/bundling-webpack/6). Matching HTML just makes the webpack plugin automatically read all the require from to include the build resource. You can simply add your CSS file as a build resource to package.json, no need to create a matching HTML file.