Skip to content

Commit

Permalink
chore: upgrade deps version
Browse files Browse the repository at this point in the history
  • Loading branch information
5aaee9 committed Dec 19, 2020
1 parent 48808a0 commit 8b59a25
Show file tree
Hide file tree
Showing 6 changed files with 1,551 additions and 2,299 deletions.
7 changes: 4 additions & 3 deletions builder/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const app = express()

const devMiddleware = webpackDevMiddleware(compiler, {
publicPath: config.output!.publicPath,
quiet: true,
})

app.use(webpackHotMiddleware(compiler))
Expand All @@ -28,16 +27,18 @@ app.use('/api', createProxyMiddleware({
app.get('*', (req, res) => {
let fileBuffer: Buffer | null = null

const fs = devMiddleware.context.outputFileSystem

try {
// Try read file from filesystem
fileBuffer = devMiddleware.fileSystem.readFileSync(`${config.output!.path}/..${req.path}`)
fileBuffer = fs.readFileSync(`${config.output!.path}/..${req.path}`)

if (req.path.endsWith('.js')) {
res.type('application/javascript')
}
} catch (err) {
// if not exsit
fileBuffer = devMiddleware.fileSystem.readFileSync(`${config.output!.path}/../index.html`)
fileBuffer = fs.readFileSync(`${config.output!.path}/../index.html`)
}

res.send(fileBuffer!.toString())
Expand Down
4 changes: 2 additions & 2 deletions builder/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ async function build() {
webpack(config, (err, status) => {
if (err) throw err

process.stdout.write(`${status.toString({
process.stdout.write(`${status!.toString({
colors: true,
modules: false,
children: true,
chunks: false,
chunkModules: false,
})}\n\n`)

if (status.hasErrors()) {
if (status!.hasErrors()) {
// eslint-disable-next-line no-console
console.error('Build failed with errors.\n')
process.exit(1)
Expand Down
2 changes: 1 addition & 1 deletion builder/webpack.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default {
performance: {
hints: false,
},
devtool: '#eval-source-map',
devtool: 'eval-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': env,
Expand Down
5 changes: 2 additions & 3 deletions builder/webpack.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ export default merge(baseConfig as Configuration, {
mode: 'production',
devtool: false,
optimization: {
minimize: true,
minimizer:[
new TerserPlugin({
sourceMap: false,
}),
new TerserPlugin(),
],
},
plugins: [
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"autoprefixer": "^10.0.1",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.0.6",
"copy-webpack-plugin": "^6.0.2",
"copy-webpack-plugin": "^7.0.0",
"cross-env": "^7.0.0",
"css-loader": "^4.3.0",
"css-loader": "^5.0.1",
"cssnano": "^4.1.10",
"eslint": "^7.3.0",
"eslint-plugin-vue": "^7.0.1",
Expand All @@ -31,11 +31,11 @@
"html-webpack-plugin": "^4.3.0",
"http-proxy-middleware": "^1.0.4",
"lodash-decorators": "^6.0.1",
"node-sass": "^4.13.1",
"node-sass": "^5.0.0",
"postcss": "^8.1.1",
"postcss-loader": "^4.0.3",
"sass-loader": "^10.0.2",
"terser-webpack-plugin": "^4.2.2",
"terser-webpack-plugin": "^5.0.3",
"ts-loader": "^8.0.4",
"ts-node": "^9.0.0",
"typescript": "^4.0.3",
Expand All @@ -47,9 +47,9 @@
"vue-template-compiler": "^2.6.11",
"vuex-class": "^0.3.2",
"vuex-module-decorators": "^1.0.1",
"webpack": "^4.41.6",
"webpack-cli": "^3.3.12",
"webpack-dev-middleware": "^3.7.2",
"webpack": "^5.11.0",
"webpack-cli": "^4.2.0",
"webpack-dev-middleware": "^4.0.2",
"webpack-dev-server": "^3.10.3",
"webpack-hot-middleware": "^2.25.0",
"webpack-merge": "^5.1.4"
Expand All @@ -58,13 +58,13 @@
"@fortawesome/fontawesome-svg-core": "^1.2.29",
"@fortawesome/free-solid-svg-icons": "^5.13.1",
"@fortawesome/vue-fontawesome": "^2.0.0",
"axios": "^0.20.0",
"axios": "^0.21.0",
"element-ui": "^2.13.2",
"lodash": "^4.17.15",
"normalize.css": "^8.0.1",
"vue": "^2.6.11",
"vue-router": "^3.3.4",
"vuex": "^3.1.2",
"vuex-persistedstate": "^3.0.1"
"vuex-persistedstate": "^4.0.0-beta.1"
}
}
Loading

0 comments on commit 8b59a25

Please sign in to comment.