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
7902ac43
Commit
7902ac43
authored
Nov 25, 2021
by
gxkai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: hmr
parent
e3dcdd3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
20 deletions
+4
-20
webpack.config.js
apps/remix-ide/webpack.config.js
+4
-20
No files found.
apps/remix-ide/webpack.config.js
View file @
7902ac43
const
nxWebpack
=
require
(
'@nrwl/react/plugins/webpack'
)
const
TerserPlugin
=
require
(
'terser-webpack-plugin'
)
const
webpack
=
require
(
'webpack'
)
const
WebpackBar
=
require
(
'webpackbar'
)
module
.
exports
=
config
=>
{
const
nxWebpackConfig
=
nxWebpack
(
config
)
...
...
@@ -16,16 +14,6 @@ module.exports = config => {
}
}
webpackConfig
.
plugins
.
push
(
new
WebpackBar
())
// webpackConfig.resolve.alias = {
// ...webpackConfig.resolve.alias,
// 'fs': 'browserfs/dist/shims/fs.js',
// 'buffer': 'browserfs/dist/shims/buffer.js',
// 'path': 'browserfs/dist/shims/path.js',
// 'processGlobal': 'browserfs/dist/shims/process.js',
// 'bufferGlobal': 'browserfs/dist/shims/bufferGlobal.js',
// 'bfsGlobal': require.resolve('browserfs')
// }
// webpackConfig.plugins.push(new webpack.ProvidePlugin({ BrowserFS: 'bfsGlobal', process: 'processGlobal', Buffer: 'bufferGlobal' }))
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'
]
...
...
@@ -39,16 +27,12 @@ module.exports = config => {
}))
return
{
...
webpackConfig
// mode: 'production',
// devtool: 'nosources-cheap-module-source-map',
// optimization: {
// minimize: true,
// minimizer: [new TerserPlugin({
// parallel: false
// })]
// }
}
}
else
{
webpackConfig
.
devServer
=
{
...
webpackConfig
.
devServer
,
hot
:
true
}
return
webpackConfig
}
}
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