Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fary-config-creator

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fary-config-creator

a common config generator for fary project

  • 0.1.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

createWebpackConfig

type

  1. server 服务端
  2. client 客户端(有服务端渲染需求时)
  3. spa 无服务端渲染时

env

'development'或者'production',如果不传,会根据NODE_ENV读取

loaderOptions

false

不适用默认loader配置,需要在外部自行用webpack-merge加入

Array

一组loader配置,将直接作为loader配置

Object
export interface IRuleOptions {
  vueLoaderOptions: object,   // vue loader 配置
  babelConfigs: object,       // babel 配置,大部分情况下可以使用.babelrc
  disableEslint: boolean,     // 不适用eslint检查代码
  useDefaultCssConfig: boolean // 是否使用默认css配置
}

createEslintConfig

jsdocLevel

jsdoc提醒等级,默认为1

createPostcssConfig

px2rem

传入px2rem的配置,如果不传则不开启该功能

注意事项

提取css

尽量保证客户端配置和服务端配置提取css的配置一致,以保证最终的渲染效果相同,过vue-loader的提取css配置:

{
  ...
  loader: 'vue-loader',
  options: {
    extractCSS: true
  }
  ...
}

建议在任何情况下,都设置服务端配置为导出css(尽管vue-server-renderer会帮助处理.vue文件的css)

roadmap

  1. 改善postcss创建配置方法,解决postcss-loader的sourcemap提醒

FAQs

Package last updated on 11 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc