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. 【转】 PreTranslateMessage作用和使用方法

    PreTranslateMessage作用和使用方法  PreTranslateMessage是消息在送给TranslateMessage函数之前被调用的,绝大多数本窗口的消息都要通过这里,比较常用, ...

  2. 【转】MFC 之CEvent

    event是用来同步不同线程的.一旦一个线程结束了自己对全局资源的使用,他通过调用SetEvent通知别人可以使用了.如果这个被删了,其他线程将被阻塞 当一个线程里调用了::WaitForSingle ...

  3. PHP 初学

    虚拟目录和虚拟主机的关系?虚拟主机可以设置多个,虚拟目录呢? 以为phpstorm和Intellij一样,结果不是!它直接将所有内容上传(部署)到服务器即可,不像Intellij那样还调用服务器?? ...

  4. (转)Invalidate、RedrawWindow与UpdateWindow的区别

     一:什么时候才会发生重绘窗口的消息? 当需要更新或重新绘制窗口的外观时,应用程序就会发送WM_PAINT消息.对窗口进行重新绘制. 二:Invalidate() -- RedrawWindow() ...

  5. DexClassLoader

    DexClassLoader加载自己写的第三方jar包,例如金山毒霸需要加载ksremote.jar. 现在将DexClassLoader加载jar包成果分享一下.   1.新建Android工程,封 ...

  6. oracle的varchar2和clob类型在hibernate中使用

    1.在oracle中 varchar2的最大长度为4000 bytes,即varchar2(4000),最多能储存2000个汉子或4000位的数字字母.当储存值超过时可以使用clob(Characte ...

  7. 使用C#压缩解压rar和zip格式文件

    为了便于文件在网络中的传输和保存,通常将文件进行压缩操作,常用的压缩格式有rar.zip和7z,本文将介绍在C#中如何对这几种类型的文件进行压缩和解压,并提供一些在C#中解压缩文件的开源库. 在C#. ...

  8. CentOS7服务器搭建百度贴吧云签到

    由无名智者开发的“百度贴吧云签到”应用是一个每天自动对百度贴吧定时进行云签到的程序.前面准备,已经有安装过mysql的linux服务器.mysql的安装在此不做介绍. 一.安装Apache yum i ...

  9. Android开发之程序猿必需要懂得Android的重要设计理念2(5.20更新版)

    上篇文章介绍了Android开发的设计理念的一部分,并没有得到博友们的多大认可,仅仅看到了一位博友在以下留言期待下一篇文章的发表,为了这小小的唯一支持.我决定继续把后面的8个要点介绍一下,自己也潜心反 ...

  10. 7 -- Spring的基本用法 -- 5... Spring容器中的Bean;容器中Bean的作用域;配置依赖;

    7.5 Spring容器中的Bean 7.5.1 Bean的基本定义和Bean别名 <beans.../>元素是Spring配置文件的根元素,该元素可以指定如下属性: default-la ...