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
be33f12f
Commit
be33f12f
authored
Nov 23, 2021
by
gxkai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 公用webpack
parent
75e0ec49
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
246 deletions
+12
-246
webpack.config.js
apps/debugger/webpack.config.js
+0
-41
index.html
apps/remix-ide/src/index.html
+0
-60
webpack.index.html
apps/remix-ide/src/webpack.index.html
+0
-92
webpack.config.js
apps/remix-ide/webpack.config.js
+6
-6
webpack.config.js
apps/solidity-compiler/webpack.config.js
+0
-41
compiler-utils.ts
libs/remix-solidity/src/compiler/compiler-utils.ts
+1
-1
package.json
package.json
+2
-2
workspace.json
workspace.json
+3
-3
No files found.
apps/debugger/webpack.config.js
deleted
100644 → 0
View file @
75e0ec49
const
nxWebpack
=
require
(
'@nrwl/react/plugins/webpack'
)
const
TerserPlugin
=
require
(
'terser-webpack-plugin'
)
module
.
exports
=
config
=>
{
const
nxWebpackConfig
=
nxWebpack
(
config
)
const
webpackConfig
=
{
...
nxWebpackConfig
,
node
:
{
fs
:
'empty'
,
tls
:
'empty'
,
readline
:
'empty'
,
net
:
'empty'
,
module
:
'empty'
,
child_process
:
'empty'
}
}
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=删
// }))
return
{
...
webpackConfig
// mode: 'production',
// devtool: 'nosources-cheap-module-source-map',
// optimization: {
// minimize: true,
// minimizer: [new TerserPlugin()]
// }
}
}
else
{
return
webpackConfig
}
}
apps/remix-ide/src/index.html
View file @
be33f12f
...
...
@@ -27,68 +27,8 @@
<link
rel=
"stylesheet"
href=
"assets/css/pygment_trac.css"
>
<link
rel=
"stylesheet"
href=
"assets/fontawesome/css/all.min.css"
>
<link
rel=
"icon"
type=
"x-icon"
href=
"assets/img/icon.png"
>
<!-- <script src="assets/js/browserfs.min.js"></script>-->
<!-- <script>-->
<!-- function urlParams () {-->
<!-- var qs = window.location.hash.substr(1)-->
<!-- if (window.location.search.length > 0) {-->
<!-- // use legacy query params instead of hash-->
<!-- window.location.hash = window.location.search.substr(1)-->
<!-- window.location.search = ''-->
<!-- }-->
<!-- var params = {}-->
<!-- var parts = qs.split('&')-->
<!-- for (var x in parts) {-->
<!-- var keyValue = parts[x].split('=')-->
<!-- if (keyValue[0] !== '') {-->
<!-- params[keyValue[0]] = keyValue[1]-->
<!-- }-->
<!-- }-->
<!-- return params-->
<!-- }-->
<!-- const defaultVersion = '0.8.0'-->
<!-- let versionToLoad = urlParams().appVersion ? urlParams().appVersion : defaultVersion-->
<!-- let assets = {-->
<!-- '0.8.0': ['assets/css/font-awesome-v5.8.1.min.css', 'assets/css/pygment_trac.css'],-->
<!-- '0.7.7': ['assets/css/font-awesome.min.css', 'assets/css/pygment_trac.css']-->
<!-- }-->
<!-- let versions = {-->
<!-- '0.7.7': 'assets/js/0.7.7/app.js', // commit 7b5c7ae3de935e0ccc32eadfd83bf7349478491e-->
<!-- '0.8.0': 'main.js'-->
<!-- }-->
<!-- for (let k in assets[versionToLoad]) {-->
<!-- let app = document.createElement('link')-->
<!-- app.setAttribute('rel', 'stylesheet')-->
<!-- app.setAttribute('href', assets[versionToLoad][k])-->
<!-- if (assets[versionToLoad][k] === 'https://use.fontawesome.com/releases/v5.8.1/css/all.css') {-->
<!-- app.setAttribute('integrity', 'sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf')-->
<!-- app.setAttribute('crossorigin', 'anonymous')-->
<!-- }-->
<!-- document.head.appendChild(app)-->
<!-- }-->
<!-- window.onload = () => {-->
<!-- BrowserFS.install(window)-->
<!-- BrowserFS.configure({-->
<!-- fs: "sessionStorage"-->
<!-- }, function(e) {-->
<!-- if (e) console.log(e)-->
<!-- let app = document.createElement('script')-->
<!-- app.setAttribute('src', versions[versionToLoad])-->
<!-- document.body.appendChild(app)-->
<!-- window.remixFileSystem = require('fs')-->
<!-- })-->
<!-- }-->
<!-- </script>-->
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, user-scalable=no"
>
</head>
<body>
<!-- <script src="runtime.js" type="module"></script>-->
<!-- <script src="runtime.es5.js" type="module"></script>-->
<!-- <script src="polyfills.js" type="module"></script>-->
<!-- <script src="vendor.js" type="module"></script>-->
<!-- <script src="vendor.es5.js" type="module"></script>-->
</body>
</html>
apps/remix-ide/src/webpack.index.html
deleted
100644 → 0
View file @
75e0ec49
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<!--
The MIT License (MIT)
Copyright (c) 2014, 2015, the individual contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<meta
http-equiv=
"X-UA-Compatible"
content=
"chrome=1"
>
<title>
Remix - Ethereum IDE
</title>
<link
rel=
"stylesheet"
href=
"assets/css/pygment_trac.css"
>
<link
rel=
"icon"
type=
"x-icon"
href=
"icon.png"
>
<script
src=
"assets/js/browserfs.min.js"
></script>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, user-scalable=no"
>
</head>
<body>
<script>
function
urlParams
()
{
var
qs
=
window
.
location
.
hash
.
substr
(
1
)
if
(
window
.
location
.
search
.
length
>
0
)
{
// use legacy query params instead of hash
window
.
location
.
hash
=
window
.
location
.
search
.
substr
(
1
)
window
.
location
.
search
=
''
}
var
params
=
{}
var
parts
=
qs
.
split
(
'&'
)
for
(
var
x
in
parts
)
{
var
keyValue
=
parts
[
x
].
split
(
'='
)
if
(
keyValue
[
0
]
!==
''
)
{
params
[
keyValue
[
0
]]
=
keyValue
[
1
]
}
}
return
params
}
const
defaultVersion
=
'0.8.0'
let
versionToLoad
=
urlParams
().
appVersion
?
urlParams
().
appVersion
:
defaultVersion
let
assets
=
{
'0.8.0'
:
[
'assets/css/font-awesome-v5.8.1.min.css'
,
'assets/css/pygment_trac.css'
],
'0.7.7'
:
[
'assets/css/font-awesome.min.css'
,
'assets/css/pygment_trac.css'
]
}
let
versions
=
{
'0.7.7'
:
'assets/js/0.7.7/app.js'
,
// commit 7b5c7ae3de935e0ccc32eadfd83bf7349478491e
'0.8.0'
:
'main.js'
}
for
(
let
k
in
assets
[
versionToLoad
])
{
let
app
=
document
.
createElement
(
'link'
)
app
.
setAttribute
(
'rel'
,
'stylesheet'
)
app
.
setAttribute
(
'href'
,
assets
[
versionToLoad
][
k
])
if
(
assets
[
versionToLoad
][
k
]
===
'https://use.fontawesome.com/releases/v5.8.1/css/all.css'
)
{
app
.
setAttribute
(
'integrity'
,
'sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf'
)
app
.
setAttribute
(
'crossorigin'
,
'anonymous'
)
}
document
.
head
.
appendChild
(
app
)
}
window
.
onload
=
()
=>
{
BrowserFS
.
install
(
window
)
BrowserFS
.
configure
({
fs
:
"sessionStorage"
},
function
(
e
)
{
if
(
e
)
console
.
log
(
e
)
let
app
=
document
.
createElement
(
'script'
)
app
.
setAttribute
(
'src'
,
versions
[
versionToLoad
])
document
.
body
.
appendChild
(
app
)
window
.
remixFileSystem
=
require
(
'fs'
)
})
}
</script>
</body>
</html>
apps/remix-ide/webpack.config.js
View file @
be33f12f
...
...
@@ -37,12 +37,12 @@ module.exports = config => {
// }),)
return
{
...
webpackConfig
,
//
mode: 'production',
//
devtool: 'nosources-cheap-module-source-map',
//
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
deleted
100644 → 0
View file @
75e0ec49
const
nxWebpack
=
require
(
'@nrwl/react/plugins/webpack'
)
const
TerserPlugin
=
require
(
'terser-webpack-plugin'
)
module
.
exports
=
config
=>
{
const
nxWebpackConfig
=
nxWebpack
(
config
)
const
webpackConfig
=
{
...
nxWebpackConfig
,
node
:
{
fs
:
'empty'
,
tls
:
'empty'
,
readline
:
'empty'
,
net
:
'empty'
,
module
:
'empty'
,
child_process
:
'empty'
}
}
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=删
// }))
return
{
...
webpackConfig
// mode: 'production',
// devtool: 'nosources-cheap-module-source-map',
// optimization: {
// minimize: true,
// minimizer: [new TerserPlugin()]
// }
}
}
else
{
return
webpackConfig
}
}
libs/remix-solidity/src/compiler/compiler-utils.ts
View file @
be33f12f
...
...
@@ -4,7 +4,7 @@ const minixhr = require('minixhr')
export
const
baseURLBin
=
'https://binaries.soliditylang.org/bin'
// export const baseURLWasm = 'https://binaries.soliditylang.org/wasm'
export
const
baseURLWasm
=
`
${
window
.
location
.
origin
}
/
assets/wasm`
export
const
baseURLWasm
=
`
${
window
.
location
.
origin
}
${
window
.
location
.
pathname
}
assets/wasm`
export
const
pathToURL
=
{}
...
...
package.json
View file @
be33f12f
...
...
@@ -57,10 +57,10 @@
"downloadsolc_assets"
:
"wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./apps/remix-ide/src/assets/js/soljson.js && wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./apps/solidity-compiler/src/assets/js/soljson.js"
,
"make-mock-compiler"
:
"node apps/remix-ide/ci/makeMockCompiler.js"
,
"minify"
:
"uglifyjs --in-source-map inline --source-map-inline -c warnings=false"
,
"build:dev"
:
"NODE_ENV=production nx build remix-ide --prod --skip-nx-cache"
,
"build:dev"
:
"
npm run fix-memory-limit &
NODE_ENV=production nx build remix-ide --prod --skip-nx-cache"
,
"serve:dev"
:
"npx http-server ./dist/apps/remix-ide"
,
"deploy:dev"
:
"./deploy.sh 172.22.17.165"
,
"fix-memory-limit"
:
"cross-env LIMIT=
4096
increase-memory-limit"
,
"fix-memory-limit"
:
"cross-env LIMIT=
10000
increase-memory-limit"
,
"nightwatch_parallel"
:
"npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome,firefox"
,
"nightwatch_local_firefox"
:
"npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=firefox"
,
"nightwatch_local_chrome"
:
"npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome"
,
...
...
workspace.json
View file @
be33f12f
...
...
@@ -38,7 +38,7 @@
"sourceMap"
:
false
,
"extractCss"
:
true
,
"namedChunks"
:
false
,
"extractLicenses"
:
tru
e
,
"extractLicenses"
:
fals
e
,
"vendorChunk"
:
false
,
"budgets"
:
[
{
...
...
@@ -644,7 +644,7 @@
],
"styles"
:
[],
"scripts"
:
[],
"webpackConfig"
:
"apps/
debugger
/webpack.config.js"
,
"webpackConfig"
:
"apps/
remix-ide
/webpack.config.js"
,
"maxWorkers"
:
2
},
"configurations"
:
{
...
...
@@ -895,7 +895,7 @@
],
"styles"
:
[
"apps/solidity-compiler/src/styles.css"
],
"scripts"
:
[],
"webpackConfig"
:
"apps/
solidity-compiler
/webpack.config.js"
,
"webpackConfig"
:
"apps/
remix-ide
/webpack.config.js"
,
"maxWorkers"
:
2
},
"configurations"
:
{
...
...
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