feat vite feature
This commit is contained in:
BIN
webpackTest/src/img/img.png
Normal file
BIN
webpackTest/src/img/img.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
11
webpackTest/src/index.html
Normal file
11
webpackTest/src/index.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>hello world shenjianZ</h1>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
11
webpackTest/src/index.js
Normal file
11
webpackTest/src/index.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import m1 from './m1'
|
||||
import m2 from './m2'
|
||||
import './style/index.css'
|
||||
// 引入图片并使用
|
||||
import img from './img/img.png'
|
||||
const imgElement = document.createElement('img')
|
||||
imgElement.src = img
|
||||
const a = 2;
|
||||
console.log(a,'@@')
|
||||
m1.m1Method()
|
||||
m2.m2Method()
|
||||
6
webpackTest/src/m1.js
Normal file
6
webpackTest/src/m1.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import $ from 'jquery'
|
||||
export default {
|
||||
m1Method() {
|
||||
console.log('m1Method')
|
||||
}
|
||||
}
|
||||
5
webpackTest/src/m2.js
Normal file
5
webpackTest/src/m2.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export default {
|
||||
m2Method() {
|
||||
console.log('m2Method')
|
||||
}
|
||||
}
|
||||
3
webpackTest/src/style/index.css
Normal file
3
webpackTest/src/style/index.css
Normal file
@@ -0,0 +1,3 @@
|
||||
h1{
|
||||
margin:10px;
|
||||
}
|
||||
Reference in New Issue
Block a user