I want to build a SPA with javascript knockout components After lots of reading and fiddling I still can't seem to get a working javascript(no typescript) knockout( with components) project with webpack. I found simple knockout projects but can't get them working with webpack.
Does someone have a demo project wit at least one ko component using webpack?
The Yeoman generator-ko-spa (in javascript) working with Webpack would be great.
Thnx
Here's how to set up a "Hello world" app from scratch:
Installing packages
npm init -ynpm install --save-dev webpack webpack-cli html-loadernpm install --save-dev knockout"scripts": { "build": "webpack" }Configuring webpack
webpack.config.jsfile:Creating our component viewmodel & view
ComponentsGreeter.htmlGreeter.jsCreating our entry points
index.htmlindex.jsfileBuild & browser
npm run build, webpack will create a file in adistfolderindex.htmlin your browser. It should greet you with a "Hello world"!