Basic webpack

This commit is contained in:
Sidharth Vinod 2022-11-04 11:29:24 +05:30
parent 97a7f1fd71
commit 1e417833f4
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
5 changed files with 952 additions and 5 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,22 @@
{
"name": "webpack",
"version": "1.0.0",
"description": "",
"private": true,
"module": "commonjs",
"scripts": {
"build": "webpack",
"serve": "webpack serve"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1"
},
"dependencies": {
"mermaid": "workspace:*"
}
}

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Getting Started</title>
</head>
<body>
<script src="./main.js"></script>
</body>
</html>

View File

@ -0,0 +1,6 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-console */
// const mermaid = require('mermaid');
import mermaid from 'mermaid';
console.log(mermaid);

View File

@ -0,0 +1,9 @@
const path = require('path');
module.exports = {
entry: './src/index.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist'),
},
};