Compare commits

...

2 Commits

Author SHA1 Message Date
shenjianZ c103c0157f Merge branch 'master' of gitea.shenjianl.cn:shenjianZ/buiildToolStudy 2024-07-26 11:22:10 +08:00
shenjianZ 359a39dedc init... 2024-07-26 11:15:42 +08:00
8 changed files with 1437 additions and 0 deletions

8
.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
.idea
# 忽略所有子项目中的 dist 文件夹
*/dist/
*/dist/*
# 忽略所有子项目中的 node_modules 文件夹
*/node_modules/
*/node_modules/*

12
01/README.md Normal file
View File

@ -0,0 +1,12 @@
**初始化项目**
```shell
npm init -y
```
**安装webpack依赖开发依赖**
```shell
npm add -D webpack webpack-cli
```
**打包项目**
```shell
npx webpack
```

1372
01/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

20
01/package.json Normal file
View File

@ -0,0 +1,20 @@
{
"name": "01",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack --config webpack.config.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"webpack": "^5.93.0",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"jquery": "^3.7.1"
}
}

6
01/src/index.js Normal file
View File

@ -0,0 +1,6 @@
import m1 from './m1'
import m2 from './m2'
const a = 2;
console.log(a,'@@')
m1.m1Method()
m2.m2Method()

6
01/src/m1.js Normal file
View File

@ -0,0 +1,6 @@
import $ from 'jquery'
export default {
m1Method() {
console.log('m1Method')
}
}

5
01/src/m2.js Normal file
View File

@ -0,0 +1,5 @@
export default {
m2Method() {
console.log('m2Method')
}
}

8
01/webpack.config.js Normal file
View File

@ -0,0 +1,8 @@
module.exports = {
mode: "development",
entry: './src/index.js',
output: {
filename: 'bundle.js'
},
}