UNPKG

pineapple-footer-fone

Version:

Shareable component for distribution via npm

76 lines (67 loc) 2.05 kB
// Конвертирование CommonJS модулей в ES6 // import commonjs from '@rollup/plugin-commonjs' // Обработка однофайловых компонентов .vue // import vue from 'rollup-plugin-vue' // import vuetify from 'rollup-plugin-vuetify' import 'vuetify/src/stylus/app.styl' import 'vuetify/src/styles/main.sass' // import Vuetify, { // VRow, // VDialog, // VCard, // VCardText, // VBtn // } from 'vuetify/lib' // // import { Ripple } from 'vuetify/lib/directives' // // Vue.use(Vuetify, { // components: { // VRow, // VDialog, // VCard, // VCardText, // VBtn // }, // directives: { // Ripple // } // }) // Транспиляция/добавление полифилов для умеренной поддержки браузеров // import buble from '@rollup/plugin-buble' // // export default { // input: 'src/wrapper.js', // Путь до относительного package.json // output: { // name: 'Popup', // exports: 'named' // }, // plugins: [ // commonjs(), // vue({ // css: true, // Динамически внедряем CSS в тег <style> // compileTemplate: true, // Явное преобразование шаблона в рендер-функцию // }), // buble() // Транспиляция в ES5 // ] // } const { rollup } = require('rollup') const vue = require('rollup-plugin-vue') const postcss = require('rollup-plugin-postcss') const vuetify = require('rollup-plugin-vuetify') const styl = require('vuetify/src/stylus/app.styl') const sass = require('vuetify/src/styles/main.sass') const build = async () => { try { const bundle = await rollup({ input: 'src/index.js', external: ['postcss', 'vue', 'vuetify/lib', 'vuetify/src/stylus/app.styl', 'vuetify/src/styles/main.sass'], plugins: [postcss(), vue(), vuetify()] }) bundle.write({ format: 'esm', file: 'dist/bundle.js' }) } catch (e) { console.error(e) } } build()