Static GitHub Issues

[1396] Can't resolve imported styles when using 1.0.0-rc4

prev: Nested Routes: Odd behavior
next: How include css in nuxt js project

I'm migrating nuxt from 0.10.7 to 1.0.0-rc4, and encounter two problems.

  1. Css modules which were installed via npm could not be parsed properly.

It complains,

This relative module was not found:

* ../../nust-boilerplate/themes/default/gitalk/dist/gitalk.css

In fact gitalk is located at ../../nust-boilerplate/themes/default/node_modules/gitalk/dist/gitalk.css

  1. Imported styles could not be parsed properly

With the code as below in one of my vue components,

<style lang="stylus" scoped>
@import 'assets/css/base/_base.styl';
.qrcode-pic
  width: 100%
</style>

It complains failed to locate @import file assets/css/base/_base.styl when building.

Here is my nuxt configs related to styles,

module.exports = {
  'css': [
    'highlight.js/styles/github.css',
    'gitalk/dist/gitalk.css',
    { 'src': 'assets/css/main.styl', 'lang': 'stylus' }
  ],
  ...
}
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1238">#c1238</a>)</em></sub></div>