vue报错 vue-cli 引入 stylus 失败
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 失败的更多相关文章
- 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 ...
- Vue报错 [Vue warn]: Cannot find element
在前端开发全面进入前端的时代 作为一个合格的前端开发工作者 框架是不可或缺的Vue React Anguar 作为前端小白,追随大佬的脚步来到来到博客园,更新现在正在学习的Vue 注 : 相信学习Vu ...
- vue报错[Vue warn]: The data property "record" is already declared as a prop. Use prop default value instead.
当我写了一个子组件,点击打开子组件那个方法时报了一个错 这句话说明意思呢?谷歌翻译一下↓ 数据属性“record”已声明为prop. 请改用prop默认值. 感觉翻译的有点怪,通过最后修改代码后大概意 ...
- 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 ...
- Vue 报错[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders
场景:父组件向子组件传递数据,子组件去试图改变父组件数据的时候. 解决:子组件通过事件向父组件传递信息,让父组件来完成数据的更改. 比如:我的父组件是普通页面,子组件是弹窗的登录界面,父组件传递的数据 ...
- 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' ...
- 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 ...
- Vue报错——“Trailing spaces not allowed”
在VSCode中开发Vue 报错:“Trailing spaces not allowed” 这是空格多了,删除多余的空格就可以了
- vue报错Error in render: "TypeError: Cannot read property '0' of undefined"
通常有两种情况: 1.在模板的html标签上使用length报错 vue 中使用 length判断的时候,有时会报错,如下: <div class="item_list" v ...
随机推荐
- Python 之 向上取整、向下取整以及四舍五入函数
import math f = 11.2 print math.ceil(f) #向上取整 print math.floor(f) #向下取整 print round(f) #四舍五入 #这三个函数的 ...
- poj 3414 Pots(广搜BFS+路径输出)
转载请注明出处:http://blog.csdn.net/u012860063?viewmode=contents 题目链接:id=3414">http://poj.org/probl ...
- 【matlab】使用VideoReader提取视频的每一帧,不能用aviread函数~
这个问题是matlab版本问题,已经不用aviread函数了~ VideoReader里面没有cdata这个函数! MATLAB不支持avireader了,而且没有cdata这个属性了,详情去官网ht ...
- 织梦DedeCMS使用SQL批量替换文章标题内容
在使用织梦DedeCMS的过程中,出于伪原创或者其他的原因,我们需要对文档的内容.标题.描述等等进行同义词或者其他的替换.这个就是一个简单的织梦SQL语句操作的问题,No牛网在织梦DedeCMS常用S ...
- crc16算法,包括单片机和c#版本
c语言的#include <stdio.h> static short const wCRC16Table[256] = { 0x0000, 0xC0C1, 0xC181 ...
- Extjs学习笔记--(四,基本函数介绍)
Ext是Extjs的命名空间,为Extjs框架提供唯一的全局变量 这样做可以避免冲突,便于代码维护 1,apply和applyif方法 apply=function(object, config, d ...
- Android 读写位于SD卡上的sqlite数据库文件错误问题
09-12 15:24:33.903: W/System.err(19499): java.lang.NullPointerException: Attempt to invoke virtual m ...
- 浅谈ITIL
本节内容 浅谈ITIL CMDB介绍 Django自定义用户认证 Restful 规范 资产管理功能开发 浅谈ITIL TIL即IT基础架构库(Information Technology Infra ...
- 安装ionice v2版本(官方帮助文档)
安装最新的 ionic 命令行工具 npm install -g ionic@latest 官方文档:http://ionicframework.com/docs/v2/getting-started ...
- git Xcode
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://2009315319.blog.51cto.com/701759/1158515 ...