feat: module added

This commit is contained in:
Mike 2023-12-18 17:54:59 -05:00
parent 8d2c9f4bed
commit 051c7e2ad5
5 changed files with 2277 additions and 3 deletions

File diff suppressed because it is too large Load diff

View file

@ -4,14 +4,19 @@
"description": "",
"private": true,
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"watch": "webpack --watch",
"start": "webpack serve --open",
"build": "webpack"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"html-webpack-plugin": "^5.5.4",
"inline-source-map": "^0.6.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
}
}

View file

@ -0,0 +1,9 @@
function component(){
const element = document.createElement('div');
element.textContent = 'Testing';
return element;
}
document.body.appendChild(component());

9
restaurant/src/menu.js Normal file
View file

@ -0,0 +1,9 @@
function menuBar() {
const items = [
"home",
"menu",
"contact"
];
}

View file

@ -1,2 +1,24 @@
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
mode: 'development',
entry: {
index: './src/index.js',
},
plugins: [
new HtmlWebpackPlugin({
title: 'Restaurant - Dev',
}),
],
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
clean: true,
},
devtool: 'inline-source-map',
devServer: {
static: './dist',
},
};