Import modules

from npm

Bare imports (not starting with ./, ../, http:.// or https://) are sourced automaticaly from npm. No npm install required.

import { render } from 'lit-element';

Latest version of the dependency is used unless you define dependencies in package.json.

from URL

import { render } from 'https://unpkg.com/lit-element';

Import CSS

See CSS, Sass or Less for the different ways to import in stylesheet files.

Importing Asset as String

Assets can be imported as strings using the ?raw suffix.

import imageSVG from './image.svg?raw';