Created
February 17, 2020 13:11
-
-
Save moqmar/d4447c13bc0cb15399c911151990a067 to your computer and use it in GitHub Desktop.
Rollup ready for Vue.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import vue from "rollup-plugin-vue"; | |
import postcss from "rollup-plugin-postcss"; | |
import html2 from "rollup-plugin-html2"; | |
import replace from "@rollup/plugin-replace"; | |
import auto from "@rollup/plugin-auto-install"; | |
import resolve from "@rollup/plugin-node-resolve"; | |
import copy from "rollup-plugin-copy"; | |
// yarn add --dev @rollup/plugin-auto-install @rollup/plugin-html @rollup/plugin-node-resolve @rollup/plugin-replace postcss rollup rollup-plugin-copy rollup-plugin-html2 rollup-plugin-postcss rollup-plugin-vue vue-template-compiler | |
export default { | |
input: "src/index.js", | |
output: { | |
dir: "public", | |
name: "index.js", | |
format: "iife", | |
sourcemap: true, | |
}, | |
plugins: [ | |
replace({"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV)}), | |
postcss({ plugins: [], extract: true }), | |
vue(), | |
auto(), | |
resolve(), | |
copy({ | |
targets: [ | |
{ src: "src/example.jpg", dest: "public" }, | |
], | |
}), | |
html2({ | |
title: "Hello World", | |
meta: { | |
description: "A hello world application.", | |
viewport: "width=device-width, initial-scale=1", | |
}, | |
template: '<!doctype html><html><head><meta charset="utf-8"></head><body></body></html>', | |
favicon: "src/logo.svg", | |
file: "index.html", | |
}), | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment