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

dpape-import-loader

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dpape-import-loader

webpack import loader. UI libraries are introduced on demand

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

dpape-import-loader

组件库按需引入工具,支持多家UI组件库配置

使用方式 Install

npm i dpape-import-loader -D

Webpack Config

    ...
    {
        test: /\.(jsx|tsx|js|ts)$/,
        exclude: /node_modules/,
        loader: "dpape-import-loader",
        options:{
            /** 
             * 组件库 String | Array<String>
            **/
            libraryNames:'vue-dpape',
            /** 
             * 参数配置
            **/
            libraryParams:{
                'vue-dpape':{
                    /**
                     * 组件放置文件夹名称
                     */
                    componentDirectory:"lib",
                    /**
                     * 样式放置文件夹名称
                     */
                    styleDirectory:"lib/theme"
                    /**
                     * 是否使用style.js引入,默认false可以不写
                     */
                    styleJs:false
                }
            }
        }
    }
    ...
    import { Button } from 'vue-dpape';
    /** ===> */
    import Button from 'vue-dpape/lib/button';
    import 'vue-dpape/lib/theme/button.css';
    /** ===> styleJs:true */
    import Button from 'vue-dpape/lib/button';
    import 'vue-dpape/lib/theme/button/style.js';

Keywords

FAQs

Package last updated on 15 Jun 2020

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