postcss

Without `from` option PostCSS could generate wrong source map or do not find Browserslist config

匿名 (未验证) 提交于 2019-12-03 08:36:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Witout from option PostCSS could generate wrong source map or do not find Browserslist config. Set it to CSS file path or to undefined to prevent this warning ionic3 project, when I running ionic corodva bulid ios --prod showing this warning for me. ionic info cli packages: (/usr/local/lib/node_modules) @ionic/cli-utils : 1.19.0 ionic (Ionic CLI) : 3.19.0 global packages: cordova (Cordova CLI) : 7.1.0 local packages: @ionic/app-scripts : 3.1.7 Cordova Platforms : android 6.3.0 ios 4.4.0 Ionic Framework : ionic-angular 3.9.2 System: ios

Why postcss-merge-rules vesion give me an error Angular 5 - Webpack

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Error with postcss plugin This a log when I tried a ng build --prod, I' using angular universal only give me that error with bootstrap and font-awesome. 10% building modules 4/6 modules 2 active ...ules/bootstrap/dist/css/bootstrap.cssUnknown error from PostCSS plugin. Your current PostCSS version is 6.0.17, but postcss-merge-rules uses 5.2.18. Perhaps this i 55% building modules 380/383 modules 3 active ...ules/bootstrap/dist/css/bootstrap.cssUnknown error from PostCSS plugin. Your current PostCSS version is 6.0.17, but postcss-merge-rules

vue-cli常用配置

扶醉桌前 提交于 2019-12-03 03:42:14
1.vue inspect > output.js 将配置按webpack.config.js输出 2.一般配置在vue.config.js中配置 configureWebpack: (config) => { // 简单/基础配置,比如引入一个新插件 config.devtool = 'sourceMap' }, //webpackchain:https://github.com/neutrinojs/webpack-chain chainWebpack: (config) => { // 链式配置// Create named rules which can be modified later config.module .rule('lint') .test(/\.js$/) .pre() .include .add('src') .end() // Even create named uses (loaders) .use('eslint') .loader('eslint-loader') .options({ rules: { semi: 'off' } }); } css: { loaderOptions: { css: { // 这里的选项会传递给 commonCss-loader }, postcss: { // 这里的选项会传递给 postcss-loader

webpack with less and postcss autoprefixer

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm new to webpack and I'm trying to set everything up to work on a react project. I have managed to get everything working in webpack as expected but have hit a road block with autoprefixer. I have followed the docs for both post css and autoprefixer and I'm obviously missing something important here or have done something daft. can you please take a look at my config and let me know if you have any suggestions. Other postcss plugins are working fine like nanocss. althought I have tried cssnext as I think that includes autoprefixer anyway.

BrowserslistError: Unknown browser major

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm trying to use bootstrap 4 with my angular installation. i've run npm install --save bootstrap@next but i have a break at runtime : . /node_modules/ css - loader ?{ "sourceMap" : false , "importLoaders" : 1 }!./ node_modules / postcss - loader / lib ?{ "ident" : "postcss" , "plugins" :[ null , null , null ], "sourceMap" : false }!./ node_modules / bootstrap / dist / css / bootstrap . min . css Module build failed : BrowserslistError : Unknown browser major at error ( C : \xampp\htdocs\tick_master_angular\web\node_modules

Webpack config error: configuration has an unknown property 'postcss'

匿名 (未验证) 提交于 2019-12-03 01:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I tried to build an angularjs application with webpack. But I can't do it because of the following error. Using the v2.1.0-beta.21 of webpack, I'm seeing this error. Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. - configuration has an unknown property 'postcss'. These properties are valid: object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, output?, parallelism?, performance?, plugins?,

postcss 将px转换成rem vuecli3+vant+vue+postcss

匿名 (未验证) 提交于 2019-12-02 20:21:24
默认是这样 module.exports = { "plugins": { "autoprefixer": {}, } } 修改成这样 module.exports = { "plugins": { "autoprefixer": { browsers: ['Android >= 4.0', 'iOS >= 7'] }, "postcss-pxtorem": { "rootValue": 37.5, 根据UI提供的375尺寸来,如果设置rootValue等于75,那么按照UI提供的750尺寸来 "propList": ["*"] } } } 3.重启项目即可 如果在项目中使用了Vant UI,这样设置会导致Vant里的样式很多都改变,那我们即想用Vant又想用postcss怎么办呢? 来源:博客园 作者: 小短腿奔跑吧 链接:https://www.cnblogs.com/gqx-html/p/11796827.html

vue中使用rem布局

情到浓时终转凉″ 提交于 2019-12-02 20:09:44
1、npm i amfe-flexible 2、import 'amfe-flexible' 然后再,安装postcss-px2rem插件 npm i postcss-px2rem 在package.json中配置 "postcss": { "plugins": { "autoprefixer": {}, "postcss-px2rem": { "remUnit": 26.7 } } } 来源: https://www.cnblogs.com/woaiqianduan/p/11762246.html

08CSS预处理器

浪子不回头ぞ 提交于 2019-12-02 05:57:05
正题:CSS预处理器 Sass 和 Less 之类的预处理器是对原生CSS的拓展,它们允许你使用类似于variables, nesting, mixins, inheritance等不存在于CSS中的特性来写CSS,CSS预处理器可以这些特殊类型的语句转化为浏览器可识别的CSS语句, 你现在可能都已经熟悉了,在webpack里使用相关loaders进行配置就可以使用了,以下是常用的CSS 处理loaders: Less Loader Sass Loader Stylus Loader 不过其实也存在一个CSS的处理平台-PostCSS,它可以帮助你的CSS实现更多的功能,在其官方文档https://github.com/postcss/postcss可了解更多相关知识。 举例来说如何使用PostCSS,我们使用PostCSS来为CSS代码自动添加适应不同浏览器的CSS前缀。 首先安装postcss-loader 和 autoprefixer(自动添加前缀的插件) npm install --save-dev postcss-loader autoprefixer 接下来,在webpack配置文件中添加postcss-loader,在根目录新建postcss.config.js,并添加如下代码之后,重新使用npm start打包时,你写的css会自动根据Can i

vue css中scoped

主宰稳场 提交于 2019-12-01 12:23:00
1、什么是scoped vue组件中,在style标签中有一个属性,叫做scoped。当此标签拥有scoped属性的时候,该组件下的css样式只适用于本组件,而不会影响全局组件。这其实也相当于样式的模块化了。 2、scoped实现的原理 其实scoped中最重要的就是PostCSS,PostCSS是一种css的编译的工具。来看一下转译之前的代码: 编译前的代码: <template> <span class="textScoped">scoped测试</span> </template> <script> </script> <style scoped> .textScoped{ color: red; } </style>复制代码 编译之后的代码: <template> <span data-v-3e5b2a80 class="textScoped">scoped测试</span> </template> <script> </script> <style scoped> .textScoped[data-v-3e5b2a80]{ color: red; } </style>复制代码 编译后,我们发现css中,PostCSS给所有的dom都添加了一个独一无二的动态属性,给css选择器也添加了一个对应的属性选择器,这样就可以让样式只作用于该属性的dom元素(组件内部的dom)。