New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

jiailing-button

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jiailing-button

### 十二、Rollup打包

latest
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

JalButton

十二、Rollup打包

1. Rollup

  • Rollup是一个模块打包器
  • Rollup支持Tree-Shaking
  • 打包的结果比Webpack要小
  • 开发框架/组件库的时候使用Rollup更合适

2. 安装依赖

  • rollup
  • rollup-plugin-terser
  • rollup-plugin-vue@5.1.9
  • Vue-template-compiler
yarn add rollup rollup-plugin-terser rollup-plugin-vue@5.1.9 vue-template-compiler -D -W

rollup.config.js

import { terser } from 'rollup-plugin-terser'
import vue from 'rollup-plugin-vue'
module.exports = [
  {
    input: 'index.js',
    output: [
      {
        file: 'dist/index.js',
        format: 'es'
      }
    ],
    plugins: [
      vue({
        css: true,
        compileTemplate: true
      }),
      terser()
    ]
  }
]

FAQs

Package last updated on 06 Sep 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