Compare commits

...

2 Commits

Author SHA1 Message Date
b1ek 7ce3c94135
add webpack 2023-04-21 09:09:18 +10:00
b1ek d6053c411f
add gitignore 2023-04-21 08:58:42 +10:00
6 changed files with 2096 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules

View File

@ -3,5 +3,13 @@
"version": "1.0.0", "version": "1.0.0",
"main": "index.js", "main": "index.js",
"author": "blek", "author": "blek",
"license": "MIT" "license": "MIT",
"devDependencies": {
"webpack": "^5.80.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.13.3"
},
"scripts": {
"dev": "webpack serve --mode development"
}
} }

9
public/index.html Normal file
View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head></head>
<body>
<div id="is-a-dev-root"></div>
<script src="bundle.js"></script>
</body>
</html>

1
src/index.js Normal file
View File

@ -0,0 +1 @@
alert('hi webpack')

15
webpack.config.js Normal file
View File

@ -0,0 +1,15 @@
const path = require('path');
module.exports = {
entry: path.resolve(__dirname, './src/index.js'),
output: {
path: path.resolve(__dirname, './public'),
filename: 'bundle.js'
},
devServer: {
static: path.resolve(__dirname, './public'),
port: process.env.APP_PORT || 8080,
host: '0.0.0.0',
allowedHosts: 'all'
}
}

2061
yarn.lock Normal file

File diff suppressed because it is too large Load Diff