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
5a6f8b1a
Commit
5a6f8b1a
authored
Nov 25, 2021
by
gxkai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 取消压缩
parent
bceedfd7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
webpack.config.js
apps/remix-ide/webpack.config.js
+10
-10
package.json
package.json
+1
-1
workspace.json
workspace.json
+1
-1
No files found.
apps/remix-ide/webpack.config.js
View file @
5a6f8b1a
...
@@ -15,16 +15,16 @@ module.exports = config => {
...
@@ -15,16 +15,16 @@ module.exports = config => {
}
}
webpackConfig
.
plugins
.
push
(
new
WebpackBar
())
webpackConfig
.
plugins
.
push
(
new
WebpackBar
())
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
const
CompressionPlugin
=
require
(
'compression-webpack-plugin'
)
//
const CompressionPlugin = require('compression-webpack-plugin')
const
productionGzipExtensions
=
[
'js'
,
'css'
,
'svg'
,
'ttf'
,
'otf'
,
'eot'
,
'woff'
,
'woff2'
,
'webp'
,
'png'
,
'sol'
]
//
const productionGzipExtensions = ['js', 'css', 'svg', 'ttf', 'otf', 'eot', 'woff', 'woff2', 'webp', 'png', 'sol']
webpackConfig
.
plugins
.
push
(
new
CompressionPlugin
({
//
webpackConfig.plugins.push(new CompressionPlugin({
filename
:
'[path].gz[query]'
,
//
filename: '[path].gz[query]',
algorithm
:
'gzip'
,
//
algorithm: 'gzip',
test
:
new
RegExp
(
'
\\
.('
+
productionGzipExtensions
.
join
(
'|'
)
+
')$'
),
//
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
threshold
:
10240
,
// 只有大小大于该值的资源会被处理 10240
//
threshold: 10240, // 只有大小大于该值的资源会被处理 10240
minRatio
:
0.8
,
// 只有压缩率小于这个值的资源才会被处理
//
minRatio: 0.8, // 只有压缩率小于这个值的资源才会被处理
deleteOriginalAssets
:
false
// 删除原文件true=删
//
deleteOriginalAssets: false // 删除原文件true=删
}))
//
}))
return
{
return
{
...
webpackConfig
...
webpackConfig
}
}
...
...
package.json
View file @
5a6f8b1a
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
"make-mock-compiler"
:
"node apps/remix-ide/ci/makeMockCompiler.js"
,
"make-mock-compiler"
:
"node apps/remix-ide/ci/makeMockCompiler.js"
,
"minify"
:
"uglifyjs --in-source-map inline --source-map-inline -c warnings=false"
,
"minify"
:
"uglifyjs --in-source-map inline --source-map-inline -c warnings=false"
,
"preinstall"
:
"sudo npm install -g node-gyp --allow-root --unsafe-perm"
,
"preinstall"
:
"sudo npm install -g node-gyp --allow-root --unsafe-perm"
,
"build:dev"
:
"NODE_ENV=production node --max-old-space-size=4096 node_modules/@nrwl/cli/bin/nx.js build remix-ide --prod --baseHref=/ide/ --skip-nx-cache --parallel=3"
,
"build:dev"
:
"NODE_ENV=production node --max-old-space-size=4096 node_modules/@nrwl/cli/bin/nx.js build remix-ide --
buildLibsFromSource --
prod --baseHref=/ide/ --skip-nx-cache --parallel=3"
,
"serve:dev"
:
"npx http-server ./dist/apps/remix-ide"
,
"serve:dev"
:
"npx http-server ./dist/apps/remix-ide"
,
"deploy:dev"
:
"./deploy.sh 172.22.17.165"
,
"deploy:dev"
:
"./deploy.sh 172.22.17.165"
,
"fix-memory-limit"
:
"cross-env LIMIT=4096 increase-memory-limit"
,
"fix-memory-limit"
:
"cross-env LIMIT=4096 increase-memory-limit"
,
...
...
workspace.json
View file @
5a6f8b1a
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
"sourceMap"
:
false
,
"sourceMap"
:
false
,
"extractCss"
:
true
,
"extractCss"
:
true
,
"namedChunks"
:
false
,
"namedChunks"
:
false
,
"extractLicenses"
:
fals
e
,
"extractLicenses"
:
tru
e
,
"vendorChunk"
:
false
,
"vendorChunk"
:
false
,
"budgets"
:
[
"budgets"
:
[
{
{
...
...
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