Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
c1344777
Commit
c1344777
authored
Dec 25, 2020
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: webpack bug
parent
7dbe9603
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
webpack.base.babel.js
internals/webpack/webpack.base.babel.js
+2
-0
webpack.prod.babel.js
internals/webpack/webpack.prod.babel.js
+3
-2
package.json
package.json
+0
-1
app.js
src/app.js
+6
-5
No files found.
internals/webpack/webpack.base.babel.js
View file @
c1344777
...
...
@@ -115,6 +115,8 @@ module.exports = options => ({
options
:
{
// Inline files smaller than 10 kB
limit
:
10
*
1024
,
outputPath
:
'assets/'
,
name
:
'[name].[ext]'
},
},
// {
...
...
internals/webpack/webpack.prod.babel.js
View file @
c1344777
...
...
@@ -17,9 +17,10 @@ module.exports = require('./webpack.base.babel')({
],
// Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
//[chunkhash:8] [chunkhash:8]
output
:
{
filename
:
'static/[name].
[chunkhash:8].
js'
,
chunkFilename
:
'static/[name].
[chunkhash:8].
chunk.js'
,
filename
:
'static/[name].js'
,
chunkFilename
:
'static/[name].chunk.js'
,
},
optimization
:
{
...
...
package.json
View file @
c1344777
...
...
@@ -18,7 +18,6 @@
"analyze"
:
"node ./internals/scripts/analyze.js"
,
"npmcheckversion"
:
"node ./internals/scripts/npmcheckversion.js"
,
"preinstall"
:
"npm run npmcheckversion"
,
"build"
:
"cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout"
,
"build:inspect"
:
"cross-env NODE_ENV=production node --inspect-brk ./node_modules/webpack/bin/webpack.js --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout"
,
"build:clean"
:
"node ./internals/webpack/clean.js"
,
...
...
src/app.js
View file @
c1344777
...
...
@@ -8,21 +8,22 @@ import 'sanitize.css/sanitize.css';
import
React
from
'react'
;
import
ReactDOM
from
'react-dom'
;
import
{
ConfigProvider
}
from
'antd'
;
import
zhCN
from
'antd/es/locale/zh_CN'
;
import
{
ConnectedRouter
}
from
'connected-react-router/immutable'
;
import
Immutable
from
'immutable'
;
import
{
Provider
}
from
'react-redux'
;
import
{
ConfigProvider
}
from
'antd
'
;
import
zhCN
from
'antd/es/locale/zh_CN'
;
import
{
PictureWallProvider
}
from
'@/components/Upload/context
'
;
import
configureStore
from
'./configureStore'
;
import
App
from
'./containers/App'
;
import
history
from
'./utils/history'
;
import
config
from
'./routes/config'
;
import
{
PictureWallProvider
}
from
'@/components/Upload/context'
;
import
history
from
'./utils/history'
;
const
initialState
=
Immutable
.
Map
();
const
store
=
configureStore
(
initialState
,
history
);
const
MOUNT_NODE
=
document
.
getElementById
(
'app'
);
const
render
=
()
=>
{
ReactDOM
.
render
(
<
Provider
store
=
{
store
}
>
...
...
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