Upgrade all the things

This commit is contained in:
Jake Ginnivan 2022-05-09 20:27:15 +08:00
parent 2dfd68e09f
commit 116abe5cd1
5 changed files with 3959 additions and 15186 deletions

View File

@ -1,3 +1,2 @@
# Ignore all HTML files: # Ignore all HTML files:
*.html *.html
*.js

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"editor.formatOnSave": true
}

19069
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,27 +4,27 @@
"zip": "node createZip.js", "zip": "node createZip.js",
"prebuild": "npm run zip", "prebuild": "npm run zip",
"dev": "cross-env NODE_ENV=development webpack-dev-server", "dev": "cross-env NODE_ENV=development webpack-dev-server",
"prod": "npm run zip && cross-env NODE_ENV=production webpack --no-progress" "prod": "npm run zip && cross-env NODE_ENV=production webpack"
}, },
"devDependencies": { "devDependencies": {
"copy-webpack-plugin": "^5.0.2", "copy-webpack-plugin": "^10.2.4",
"cross-env": "^5.1", "cross-env": "^7.0",
"css-loader": "^0.28.10", "css-loader": "^6.7.1",
"extract-text-webpack-plugin": "^4.0.0-beta.0", "mini-css-extract-plugin": "^2.6.0",
"glob-all": "^3.1.0", "glob-all": "^3.3.0",
"html-webpack-plugin": "^3.0.6", "html-webpack-plugin": "^5.5.0",
"postcss": "^8.4.13", "postcss": "^8.4.13",
"postcss-loader": "^2.1.1", "postcss-loader": "^6.2.1",
"style-loader": "^0.20.3", "style-loader": "^3.3.1",
"tailwindcss": "^3.0.24", "tailwindcss": "^3.0.24",
"webpack": "^4.29.6", "webpack": "^5.72.0",
"webpack-cli": "^3.3.0", "webpack-cli": "^4.9.2",
"webpack-dev-server": "^3.2.1" "webpack-dev-server": "^4.9.0"
}, },
"dependencies": { "dependencies": {
"alpinejs": "^3.10.2", "alpinejs": "^3.10.2",
"archiver": "^5.0.0", "archiver": "^5.3.1",
"autoprefixer": "^10.4.6", "autoprefixer": "^10.4.7",
"typeface-roboto-mono": "^0.0.75" "typeface-roboto-mono": "^1.1.13"
} }
} }

View File

@ -1,8 +1,7 @@
const ExtractTextPlugin = require("extract-text-webpack-plugin"); const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin"); const CopyWebpackPlugin = require("copy-webpack-plugin");
module.exports = { module.exports = {
entry: "./src/css/tailwind.src.css", entry: "./src/css/tailwind.src.css",
mode: process.env.NODE_ENV, mode: process.env.NODE_ENV,
@ -10,37 +9,28 @@ module.exports = {
rules: [ rules: [
{ {
test: /\.css$/, test: /\.css$/,
use: ExtractTextPlugin.extract({ use: [MiniCssExtractPlugin.loader, "css-loader", "postcss-loader"],
fallback: "style-loader",
use: [
{ loader: "css-loader", options: { importLoaders: 2 } },
"postcss-loader",
],
}),
}, },
], ],
}, },
plugins: [ plugins: [
new ExtractTextPlugin("styles.css", { new MiniCssExtractPlugin(),
disable: process.env.NODE_ENV === "development",
}),
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
filename: "index.html", filename: "index.html",
template: "src/index.html", template: "src/index.html",
}), }),
/// Enable images folder /// Enable images folder
new CopyWebpackPlugin([ new CopyWebpackPlugin({
{ patterns: [
from: "src/images", {
to: "images", from: "src/images",
}, to: "images",
]), },
/// Enable js folder {
new CopyWebpackPlugin([ from: "src/js",
{ to: "js",
from: "src/js", },
to: "js", ],
}, }),
]),
], ],
}; };