diff --git a/README.md b/README.md index 05eb1c2..020a012 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ Template Webpack Starting Project -Will include support for +Will (eventually) include support for - HTML - ESM - TypeScript diff --git a/makefile b/makefile index a8a8c92..9c3d5b5 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,7 @@ build: mkdir -p dist - cp static/index.html dist/ - cp src/index.js dist/ + cp -r static/* dist/ + cp -r src/* dist/ dev-server: python -m http.server --directory dist/ 8700 diff --git a/src/index.js b/src/index.js index ec9ece0..d30cce9 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,9 @@ +import { doWork } from "./module.js"; + function createComponent() { const elem = document.createElement("div"); elem.innerText = "Hello, Webpack"; + doWork(); return elem; } diff --git a/src/module.js b/src/module.js new file mode 100644 index 0000000..b433ccb --- /dev/null +++ b/src/module.js @@ -0,0 +1,3 @@ +export function doWork() { + console.log("doing some major work right now"); +} diff --git a/static/index.html b/static/index.html index d7c3586..2dbe77c 100644 --- a/static/index.html +++ b/static/index.html @@ -4,6 +4,6 @@