Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
9caf5b68
Commit
9caf5b68
authored
Nov 22, 2021
by
gxkai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: ts
parent
1ee18b2e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
48 deletions
+51
-48
webpack.config.js
apps/debugger/webpack.config.js
+17
-16
webpack.config.js
apps/remix-ide/webpack.config.js
+16
-15
webpack.config.js
apps/solidity-compiler/webpack.config.js
+17
-16
package.json
package.json
+1
-1
No files found.
apps/debugger/webpack.config.js
View file @
9caf5b68
...
...
@@ -16,23 +16,24 @@ module.exports = config => {
}
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
const
CompressionPlugin
=
require
(
'compression-webpack-plugin'
)
const
productionGzipExtensions
=
[
'js'
,
'css'
,
'svg'
,
'ttf'
,
'otf'
,
'eot'
,
'woff'
,
'woff2'
,
'webp'
,
'png'
,
'sol'
]
webpackConfig
.
plugins
.
push
(
new
CompressionPlugin
({
filename
:
'[path].gz[query]'
,
algorithm
:
'gzip'
,
test
:
new
RegExp
(
'
\\
.('
+
productionGzipExtensions
.
join
(
'|'
)
+
')$'
),
threshold
:
10240
,
// 只有大小大于该值的资源会被处理 10240
minRatio
:
0.8
,
// 只有压缩率小于这个值的资源才会被处理
deleteOriginalAssets
:
true
// 删除原文件true=删
}))
//
const CompressionPlugin = require('compression-webpack-plugin')
//
const productionGzipExtensions = ['js', 'css', 'svg', 'ttf', 'otf', 'eot', 'woff', 'woff2', 'webp', 'png', 'sol']
//
webpackConfig.plugins.push(new CompressionPlugin({
//
filename: '[path].gz[query]',
//
algorithm: 'gzip',
//
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
//
threshold: 10240, // 只有大小大于该值的资源会被处理 10240
//
minRatio: 0.8, // 只有压缩率小于这个值的资源才会被处理
//
deleteOriginalAssets: true // 删除原文件true=删
//
}))
return
{
...
webpackConfig
,
mode
:
'production'
,
optimization
:
{
minimize
:
true
,
minimizer
:
[
new
TerserPlugin
()]
}
...
webpackConfig
// mode: 'production',
// devtool: 'nosources-cheap-module-source-map',
// optimization: {
// minimize: true,
// minimizer: [new TerserPlugin()]
// }
}
}
else
{
return
webpackConfig
...
...
apps/remix-ide/webpack.config.js
View file @
9caf5b68
...
...
@@ -16,23 +16,24 @@ module.exports = config => {
}
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
const
CompressionPlugin
=
require
(
'compression-webpack-plugin'
)
const
productionGzipExtensions
=
[
'js'
,
'css'
,
'svg'
,
'ttf'
,
'otf'
,
'eot'
,
'woff'
,
'woff2'
,
'webp'
,
'png'
,
'sol'
]
webpackConfig
.
plugins
.
push
(
new
CompressionPlugin
({
filename
:
'[path].gz[query]'
,
algorithm
:
'gzip'
,
test
:
new
RegExp
(
'
\\
.('
+
productionGzipExtensions
.
join
(
'|'
)
+
')$'
),
threshold
:
10240
,
// 只有大小大于该值的资源会被处理 10240
minRatio
:
0.8
,
// 只有压缩率小于这个值的资源才会被处理
deleteOriginalAssets
:
true
// 删除原文件true=删
}),)
//
const CompressionPlugin = require('compression-webpack-plugin')
//
const productionGzipExtensions = ['js', 'css', 'svg', 'ttf', 'otf','eot','woff','woff2','webp','png','sol']
//
webpackConfig.plugins.push(new CompressionPlugin({
//
filename: '[path].gz[query]',
//
algorithm: 'gzip',
//
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
//
threshold: 10240, // 只有大小大于该值的资源会被处理 10240
//
minRatio: 0.8, // 只有压缩率小于这个值的资源才会被处理
//
deleteOriginalAssets: true // 删除原文件true=删
//
}),)
return
{
...
webpackConfig
,
mode
:
'production'
,
optimization
:
{
minimize
:
true
,
minimizer
:
[
new
TerserPlugin
()]
}
// mode: 'production',
// devtool: 'nosources-cheap-module-source-map',
// optimization: {
// minimize: true,
// minimizer: [new TerserPlugin()]
// }
}
}
else
{
return
webpackConfig
...
...
apps/solidity-compiler/webpack.config.js
View file @
9caf5b68
...
...
@@ -16,23 +16,24 @@ module.exports = config => {
}
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
const
CompressionPlugin
=
require
(
'compression-webpack-plugin'
)
const
productionGzipExtensions
=
[
'js'
,
'css'
,
'svg'
,
'ttf'
,
'otf'
,
'eot'
,
'woff'
,
'woff2'
,
'webp'
,
'png'
,
'sol'
]
webpackConfig
.
plugins
.
push
(
new
CompressionPlugin
({
filename
:
'[path].gz[query]'
,
algorithm
:
'gzip'
,
test
:
new
RegExp
(
'
\\
.('
+
productionGzipExtensions
.
join
(
'|'
)
+
')$'
),
threshold
:
10240
,
// 只有大小大于该值的资源会被处理 10240
minRatio
:
0.8
,
// 只有压缩率小于这个值的资源才会被处理
deleteOriginalAssets
:
true
// 删除原文件true=删
}))
//
const CompressionPlugin = require('compression-webpack-plugin')
//
const productionGzipExtensions = ['js', 'css', 'svg', 'ttf', 'otf', 'eot', 'woff', 'woff2', 'webp', 'png', 'sol']
//
webpackConfig.plugins.push(new CompressionPlugin({
//
filename: '[path].gz[query]',
//
algorithm: 'gzip',
//
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
//
threshold: 10240, // 只有大小大于该值的资源会被处理 10240
//
minRatio: 0.8, // 只有压缩率小于这个值的资源才会被处理
//
deleteOriginalAssets: true // 删除原文件true=删
//
}))
return
{
...
webpackConfig
,
mode
:
'production'
,
optimization
:
{
minimize
:
true
,
minimizer
:
[
new
TerserPlugin
()]
}
...
webpackConfig
// mode: 'production',
// devtool: 'nosources-cheap-module-source-map',
// optimization: {
// minimize: true,
// minimizer: [new TerserPlugin()]
// }
}
}
else
{
return
webpackConfig
...
...
package.json
View file @
9caf5b68
...
...
@@ -28,7 +28,7 @@
"nx"
:
"nx"
,
"start"
:
"nx start"
,
"serve"
:
"nx serve"
,
"build"
:
"n
x build
"
,
"build"
:
"n
pm run build:dev
"
,
"test"
:
"nx test"
,
"lint"
:
"nx lint"
,
"affected:apps"
:
"nx affected:apps"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment