From ca59aae55ce4221700d53959b67e578f57dad941 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 1 Nov 2019 19:03:50 +0100 Subject: [PATCH] Use pikapkg.web for dependencies This fixes the lit-html import without a full bundler. See https://www.pika.dev/blog/pika-web-a-future-without-webpack/ --- .gitignore | 1 + npm/hello-world.js | 2 +- npm/package.json | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d5f19d8..419380e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules package-lock.json +web_modules diff --git a/npm/hello-world.js b/npm/hello-world.js index b3e3b9a..f4b48f2 100644 --- a/npm/hello-world.js +++ b/npm/hello-world.js @@ -1,4 +1,4 @@ -import { LitElement, html, css } from './node_modules/lit-element/lit-element.js'; +import { LitElement, html, css } from './web_modules/lit-element.js'; class HelloWorld extends LitElement { render() { diff --git a/npm/package.json b/npm/package.json index 9e8ff49..b35e351 100644 --- a/npm/package.json +++ b/npm/package.json @@ -9,6 +9,7 @@ }, "devDependencies": {}, "scripts": { + "install": "npx @pika/web", "test": "echo \"Error: no test specified\" && exit 1", "run": "python -m http.server -b localhost" }, -- 2.39.5