mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Basic webpack
This commit is contained in:
parent
97a7f1fd71
commit
1e417833f4
910
pnpm-lock.yaml
generated
910
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
22
tests/webpack/package.json
Normal file
22
tests/webpack/package.json
Normal 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:*"
|
||||||
|
}
|
||||||
|
}
|
10
tests/webpack/public/index.html
Normal file
10
tests/webpack/public/index.html
Normal 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>
|
6
tests/webpack/src/index.js
Normal file
6
tests/webpack/src/index.js
Normal 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);
|
9
tests/webpack/webpack.config.js
Normal file
9
tests/webpack/webpack.config.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
entry: './src/index.js',
|
||||||
|
output: {
|
||||||
|
filename: 'main.js',
|
||||||
|
path: path.resolve(__dirname, 'dist'),
|
||||||
|
},
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user