Last active
February 7, 2018 03:05
-
-
Save caseyWebb/1d90996873563eb8b05ef4a45b856146 to your computer and use it in GitHub Desktop.
KnockoutJS HMR - Medium - 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const template = 'Hello, World!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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