Skip to content

Instantly share code, notes, and snippets.

@timwis timwis/index.html Secret
Last active May 8, 2018

Embed
What would you like to do?
attempting to get skate.js to work with webpack
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<hello-world></hello-world>
<script src="bundle.js"></script>
</body>
</html>
import { props, withComponent } from 'skatejs'
import withLitHtml from '@skatejs/renderer-lit-html'
import { html } from 'lit-html'
export default class HelloWorld extends withComponent(withLitHtml()) {
render () {
return html`<div>Hello, world!</div>`
}
}
customElements.define('hello-world', HelloWorld)
{
"name": "vizwit",
"version": "2.0.0-alpha",
"description": "",
"main": "src/index.js",
"scripts": {
"start": "webpack-dev-server --mode development"
},
"repository": {
"type": "git",
"url": "git+https://github.com/timwis/vizwit.git"
},
"author": "timwis <tim@timwis.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/timwis/vizwit/issues"
},
"homepage": "https://github.com/timwis/vizwit#readme",
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
"webpack": "^4.8.1",
"webpack-cli": "^2.1.3",
"webpack-dev-server": "^3.1.4"
},
"dependencies": {
"@skatejs/renderer-lit-html": "^0.2.0",
"lit-html": "^0.10.0",
"skatejs": "^5.1.2"
}
}
const path = require('path')
module.exports = {
entry: './src/index.js',
devtool: 'inline-source-map',
devServer: {
contentBase: './dist'
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.