mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
build: use webpack dashboard
This commit is contained in:
parent
126673b828
commit
897a116384
3 changed files with 756 additions and 12 deletions
|
|
@ -11,7 +11,7 @@
|
|||
"node": ">=18"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "VERSION=dev-v$(node scripts/get-version.js) NODE_OPTIONS=--openssl-legacy-provider webpack --watch",
|
||||
"dev": "VERSION=dev-v$(node scripts/get-version.js) NODE_OPTIONS=--openssl-legacy-provider webpack-dashboard -- webpack --watch",
|
||||
"debug-firefox": "web-ext run --source-dir=dist-firefox --keep-profile-changes --start-url https://github.com/EnixCoda/Gitako",
|
||||
"prepare": "husky install",
|
||||
"postinstall": "patch-package",
|
||||
|
|
@ -97,7 +97,8 @@
|
|||
"web-ext": "^7.11.0",
|
||||
"webpack": "^5.91.0",
|
||||
"webpack-bundle-analyzer": "^4.10.2",
|
||||
"webpack-cli": "^5.1.4"
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dashboard": "^3.3.8"
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 100,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import * as path from 'node:path'
|
||||
import * as s from 'superstruct'
|
||||
import type { Configuration } from 'webpack'
|
||||
const DashboardPlugin = require('webpack-dashboard/plugin')
|
||||
const webpack = require('webpack')
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin')
|
||||
|
|
@ -18,6 +19,7 @@ function createConfig({ envTarget }: { envTarget: 'default' | 'firefox' | 'safar
|
|||
}[envTarget]
|
||||
|
||||
const plugins = [
|
||||
new DashboardPlugin(),
|
||||
new CleanWebpackPlugin(),
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
|
|
|
|||
Loading…
Reference in a new issue