Skip to content

Commit

Permalink
fix: migrate rollup to esm modules
Browse files Browse the repository at this point in the history
  • Loading branch information
denysdovhan committed Jun 16, 2024
1 parent 3aa1946 commit 125cb58
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
31 changes: 17 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "vacuum-card",
"version": "2.9.3",
"type": "module",
"description": "Vacuum cleaner card for Home Assistant Lovelace UI",
"main": "dist/vacuum-card.js",
"scripts": {
Expand All @@ -10,7 +11,7 @@
"format": "prettier --write .",
"build": "rollup -c",
"test": "npm run lint && npm run build",
"prepare": "husky install"
"prepare": "husky"
},
"keywords": [
"home-assistant",
Expand Down Expand Up @@ -53,7 +54,7 @@
"postcss-preset-env": "^9.1.3",
"prettier": "^3.0.3",
"rollup": "^2.7.6",
"rollup-plugin-minify-html-literals": "^1.2.6",
"rollup-plugin-html-literals": "^1.1.8",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-postcss-lit": "^2.0.0",
"rollup-plugin-serve": "^2.0.1",
Expand Down
7 changes: 5 additions & 2 deletions rollup.config.js → rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-env node */
import pkg from './package.json';
import { createRequire } from 'node:module';
import commonjs from '@rollup/plugin-commonjs';
import nodeResolve from '@rollup/plugin-node-resolve';
import json from '@rollup/plugin-json';
Expand All @@ -10,10 +10,13 @@ import postcss from 'rollup-plugin-postcss';
import postcssPresetEnv from 'postcss-preset-env';
import postcssLit from 'rollup-plugin-postcss-lit';
import { terser } from 'rollup-plugin-terser';
import minifyLiterals from 'rollup-plugin-minify-html-literals';
import minifyLiterals from 'rollup-plugin-html-literals';
import replace from '@rollup/plugin-replace';
import serve from 'rollup-plugin-serve';

const require = createRequire(import.meta.url);
const pkg = require('./package.json');

const IS_DEV = process.env.ROLLUP_WATCH;

const serverOptions = {
Expand Down

0 comments on commit 125cb58

Please sign in to comment.