Commit c581c416 authored by Sebastian Speitel's avatar Sebastian Speitel
Browse files

Initial Commit

parents
node_modules
build
\ No newline at end of file
This diff is collapsed.
import ts from "rollup-plugin-typescript2";
import copy from "rollup-plugin-copy";
import vue from "rollup-plugin-vue";
import resolve from "@rollup/plugin-node-resolve";
import cjs from "@rollup/plugin-commonjs";
import replace from "@rollup/plugin-replace";
import css from "rollup-plugin-postcss";
import { terser } from "rollup-plugin-terser";
const production = process.env.NODE_ENV === "production";
export default {
input: ["src/main.ts"],
output: {
format: "esm",
dir: "build",
sourcemap: false && !production
},
plugins: [
copy({
targets: [
{ src: "./src/index.html", dest: "./build" },
{ src: "./static/*", dest: "./build" }
]
}),
replace({
"process.env.NODE_ENV": JSON.stringify(
production ? "production" : "development"
),
__VUE_OPTIONS_API__: false,
__VUE_PROD_DEVTOOLS__: !production
}),
resolve(),
cjs(),
ts(),
vue(),
css({ extract: "bundle.css" }),
production &&
terser({
module: true,
compress: {
booleans_as_integers: true,
drop_console: false,
ecma: 2018,
hoist_funs: true,
keep_fargs: false,
passes: 2,
toplevel: true,
unsafe_arrows: true,
unsafe_comps: true,
unsafe_Function: true,
unsafe_math: true,
unsafe_symbols: true,
unsafe_methods: true,
unsafe_proto: true,
unsafe_regexp: true,
unsafe_undefined: true
},
mangle: { module: true, toplevel: true, properties: false }
})
]
};
<template>
<div>
<h1>Hi</h1>
</div>
</template>
<script lang="ts">
export default { setup() {} };
</script>
<!DOCTYPE html>
<html lang="de-de">
<head>
<meta charset="utf-8" />
<title>Vue3 Template</title>
<link rel="canonical" href="./index.html" />
<link rel="preload" href="./bundle.css" as="style" />
<meta
name="viewport"
content="width=device-width,minimum-scale=1,initial-scale=1"
/>
<meta name="description" content="Iso" />
<meta name="theme-color" content="#000000" />
<script src="./main.js" type="module"></script>
<link rel="stylesheet" type="text/css" href="bundle.css" />
</head>
<body>
<main></main>
</body>
</html>
import { createApp } from "vue";
import App from "./App.vue";
createApp(App).mount("main");
declare module "*.vue" {
import { Component } from "vue";
const self: Component;
export default self;
}
{
"compilerOptions": {
"module": "ESNext",
"target": "ES2018",
"moduleResolution": "Node",
"lib": [
"ESNext",
"DOM"
]
},
"exclude": [
"node_modules"
]
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment