Skip to content

Instantly share code, notes, and snippets.

@caseyWebb
Last active February 7, 2018 03:05
Show Gist options
  • Save caseyWebb/1d90996873563eb8b05ef4a45b856146 to your computer and use it in GitHub Desktop.
Save caseyWebb/1d90996873563eb8b05ef4a45b856146 to your computer and use it in GitHub Desktop.
KnockoutJS HMR - Medium - 1
export const template = 'Hello, World!'
import * as ko from 'knockout'
import * as helloWorldComponent from './hello-world'
document.body.appendChild(document.createElement('hello-world'))
ko.components.register('hello-world', helloWorldComponent)
ko.applyBindings()
{
"dependencies": {
"knockout": "^3.5.0-beta",
"webpack": "^3.10.0",
"webpack-dev-server": "^2.11.1"
},
"scripts": {
"start": "webpack-dev-server"
},
"devDependencies": {
"html-webpack-plugin": "^2.30.1"
}
}
'use strict'
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
context: __dirname,
entry: './index.js',
output: './bundle.js',
plugins: [
new HtmlWebpackPlugin()
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment