1.1.1.   vue-cli 引入 stylus 失败

先通过vue-cli的webpack模板建立文件夹:

vue init webpack test-stylus

然后安装依赖

npm install

再然后 安装stylus stylus-loader style-loader

npm install stylus stylus-loader style-loader --save-dev

然后改了一下webpack的配置在webpack.base.conf.js的module的loaders里加入了

{

test: /\.styl$/, loader: 'style-loader!css-loader!stylus-loader'

}

在resolve的extensions里加入了.styl

extensions: ['', '.js', '.vue','.styl']

接下来就随便写了个index.styl文件,内容就一行(实验嘛)

body

margin 0

然后在main.js里引入

import './stylus/index.styl'

接下来

npm run dev

vue报错 vue-cli 引入 stylus 失败的更多相关文章

  1. vue报错[Vue warn]: Unknown custom element: <router-Link> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

    vue浏览器报错,如下 vue.runtime.esm.js?2b0e:619 [Vue warn]: Unknown custom element: <router-Link> - di ...

  2. Vue报错 [Vue warn]: Cannot find element

    在前端开发全面进入前端的时代 作为一个合格的前端开发工作者 框架是不可或缺的Vue React Anguar 作为前端小白,追随大佬的脚步来到来到博客园,更新现在正在学习的Vue 注 : 相信学习Vu ...

  3. vue报错[Vue warn]: The data property "record" is already declared as a prop. Use prop default value instead.

    当我写了一个子组件,点击打开子组件那个方法时报了一个错 这句话说明意思呢?谷歌翻译一下↓ 数据属性“record”已声明为prop. 请改用prop默认值. 感觉翻译的有点怪,通过最后修改代码后大概意 ...

  4. vue报错 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's

    [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent c ...

  5. Vue 报错[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders

    场景:父组件向子组件传递数据,子组件去试图改变父组件数据的时候. 解决:子组件通过事件向父组件传递信息,让父组件来完成数据的更改. 比如:我的父组件是普通页面,子组件是弹窗的登录界面,父组件传递的数据 ...

  6. Vue 报错Error in render: “TypeError: Cannot read properties of null (reading ‘xxx’)” found in

    前端vue报错 [Vue warn]: Error in render: "TypeError: Cannot read properties of null (reading 'name' ...

  7. Vue报错 type check failed for prop “xxx“. Expected String with value “xx“,got Number with value ‘xx‘

    vue报错    [Vue warn]: Invalid prop: type check failed for prop "name". Expected String with ...

  8. Vue报错——“Trailing spaces not allowed”

    在VSCode中开发Vue 报错:“Trailing spaces not allowed” 这是空格多了,删除多余的空格就可以了

  9. vue报错Error in render: "TypeError: Cannot read property '0' of undefined"

    通常有两种情况: 1.在模板的html标签上使用length报错 vue 中使用 length判断的时候,有时会报错,如下: <div class="item_list" v ...

随机推荐

  1. e664. 在图像中获取子图像

    // From an Image image = createImage(new FilteredImageSource(image.getSource(), new CropImageFilter( ...

  2. JAVA 多线程机制(二)

    主要内容 1.理解线程的并发性 2.线程的同步 3.线程的常用方法   上一章中由于线程的并发性导致了多线程的执行总是会出现一些问题..线程的并发性是程序员不可控制 的,也是不可避免的,线程的并发性往 ...

  3. 剑指offer_面试题5_从尾到头打印链表(栈和递归实现)

    题目:输入一个链表的头结点,从尾到头反过来打印出每一个节点的值 考察 单链表操作.栈.递归等概念. 理解:要实现单链表的输出,那么就须要遍历.遍历的顺序是从头到尾.而节点输出的顺序是从尾到头.因此,先 ...

  4. 【转载】关于quartus ii软件中注释乱码问题的解决方法

    最近在看Verilog代码,由于我的quartus版本打开他们的文件注释会全部乱码,痛苦万分!从网上找了下原因,解决方法基本没有,不过看到有人提出是编码的问题,立马我就想到一个解决方法,经过实验果然有 ...

  5. Unity3D-光照贴图技术

    概念 Lightmapping光照贴图技术是一种增强静态场景光照效果的技术,其优点是可以通过较少的性能消耗使静态场景看上去更加真实,丰富,更加具有立体感:缺点是不能用来实时地处理动态光照.当游戏场景包 ...

  6. 【Deep learning】NLP

    http://www.tuicool.com/articles/EvaQJnJ http://cs224d.stanford.edu/syllabus.html

  7. struts2的零配置

    最近开始关注struts2的新特性,从这个版本开始,Struts开始使用convention-plugin代替codebehind-plugin来实现struts的零配置.配置文件精简了,的确是简便了 ...

  8. bat、cmd、dos窗口:后台调用,不显示黑色的控制台dos(命令行)窗口

    建立一个windows的vbs脚本文件,内容类似如下:注意末尾的参数0 createobject("wscript.shell").run "VBoxheadless.e ...

  9. mysql中,如何查看数据库中当前可用的校勘?字符集默认的collation?

    需求描述: mysql的字符集在使用的过程中会有一些规则,这些规则就组成了校勘, 也就是通过什么规则做什么事,比如,如何比较两个字符的大小,后台都是有一些 规则,这些规则就是校勘的一部分. 那么,查看 ...

  10. osgEarth中的StringUtils头文件中有很多关于字符串的操作