From dc72752eeef7515178d0a92146dda2f40f2b739c Mon Sep 17 00:00:00 2001 From: ludeeus Date: Sat, 4 Jan 2020 13:02:39 +0000 Subject: [PATCH] Fix build --- package.json | 5 +---- rollup.config.debug.js | 12 +----------- rollup.config.js | 11 +++-------- src/HacsFrontend.ts | 2 +- 4 files changed, 6 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 100ae684..77953f2c 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,6 @@ }, "homepage": "https://github.com/hacs/frontend#readme", "devDependencies": { - "@babel/core": "^7.6.4", - "@babel/plugin-proposal-class-properties": "^7.4.0", - "@babel/plugin-proposal-decorators": "^7.4.0", "@rollup/plugin-json": "^4.0.0", "@typescript-eslint/eslint-plugin": "^2.4.0", "@typescript-eslint/parser": "^2.4.0", @@ -33,7 +30,6 @@ "node-emoji": "^1.10.0", "patch-package": "^6.2.0", "prettier": "^1.16.4", - "rollup-plugin-babel-minify": "^9.1.1", "rollup-plugin-babel": "^4.3.2", "rollup-plugin-cleanup": "^3.1.1", "rollup-plugin-commonjs": "^10.1.0", @@ -42,6 +38,7 @@ "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-progress": "^1.1.1", "rollup-plugin-sizes": "^1.0.1", + "rollup-plugin-terser": "^5.1.2", "rollup-plugin-typescript2": "^0.24.3", "rollup": "^1.24.0", "sweetalert": "^2.1.2", diff --git a/rollup.config.debug.js b/rollup.config.debug.js index d5f7b413..b6c6f7db 100644 --- a/rollup.config.debug.js +++ b/rollup.config.debug.js @@ -1,7 +1,6 @@ import nodeResolve from "rollup-plugin-node-resolve"; import commonjs from "rollup-plugin-commonjs"; import typescript from "rollup-plugin-typescript2"; -import babel from "rollup-plugin-babel"; import json from "@rollup/plugin-json"; import gzipPlugin from "rollup-plugin-gzip"; @@ -11,14 +10,5 @@ export default { file: `hacs_frontend/debug.js`, format: "es" }, - plugins: [ - nodeResolve({}), - commonjs(), - typescript(), - json(), - babel({ - exclude: "node_modules/**" - }), - gzipPlugin() - ] + plugins: [nodeResolve({}), commonjs(), typescript(), json(), gzipPlugin()] }; diff --git a/rollup.config.js b/rollup.config.js index c5c9e347..9def8e52 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,11 +1,9 @@ import { terser } from "rollup-plugin-terser"; -import babel from "rollup-plugin-babel"; import cleanup from "rollup-plugin-cleanup"; import commonjs from "rollup-plugin-commonjs"; import dev from "rollup-plugin-dev"; import gzipPlugin from "rollup-plugin-gzip"; import json from "@rollup/plugin-json"; -import minify from "rollup-plugin-babel-minify"; import nodeResolve from "rollup-plugin-node-resolve"; import progress from "rollup-plugin-progress"; import sizes from "rollup-plugin-sizes"; @@ -18,9 +16,8 @@ const opts_json = { preferConst: true }; -const opts_babel = { - exclude: "node_modules/**", - sourceMap: "inline" +const opts_terser = { + mangle: false }; const opts_dev = { @@ -43,9 +40,7 @@ const AwesomePlugins = [ commonjs(), typescript(), json(opts_json), - babel(opts_babel), - !isdev && minify(), - !isdev && terser(), + !isdev && terser(opts_terser), !isdev && cleanup(opts_cleanup), isdev && sizes(), isdev && sizes(opts_sizes), diff --git a/src/HacsFrontend.ts b/src/HacsFrontend.ts index 6cec5c2b..de162c00 100644 --- a/src/HacsFrontend.ts +++ b/src/HacsFrontend.ts @@ -1,4 +1,4 @@ -/* eslint-disable no-console, no-undef, prefer-destructuring, prefer-destructuring, no-constant-condition, max-len */ +/* eslint-disable no-undef, prefer-destructuring, prefer-destructuring, no-constant-condition, max-len */ import { HomeAssistant } from "custom-card-helpers"; import { css,