Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
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
CivWeb
Commits
86a0ccf9
Commit
86a0ccf9
authored
Dec 25, 2020
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix webpack packages
parent
1d61fbbc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
11 deletions
+15
-11
build.js
internals/webpack/build.js
+6
-5
build.dev.js
internals/webpack/dist/build.dev.js
+5
-6
app.js
src/app.js
+4
-0
No files found.
internals/webpack/build.js
View file @
86a0ccf9
...
...
@@ -11,9 +11,12 @@ const spinner = ora('building for production...');
// const Diff = require('diff');
spinner
.
start
()
rm
(
argv
.
releasepath
?
path
.
resolve
(
argv
.
releasepath
,
pkg
.
name
.
toLocaleLowerCase
()):
`./
${
pkg
.
name
.
toLocaleLowerCase
()}
`
,
err
=>
{
if
(
err
)
throw
err
webpack
(
webpackConfig
,
function
(
err
,
stats
)
{
// rm(argv.releasepath ? path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase()): `./${pkg.name.toLocaleLowerCase()}`, err => {
// if (err) throw err
// })
webpack
(
webpackConfig
,
function
(
err
,
stats
)
{
spinner
.
stop
()
if
(
err
)
throw
err
process
.
stdout
.
write
(
stats
.
toString
({
...
...
@@ -36,5 +39,4 @@ rm(argv.releasepath ? path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase(
' Tip: built files are meant to be served over an HTTP server.
\
n'
+
' Opening index.html over file:// won
\'
t work.
\
n'
))
})
})
\ No newline at end of file
internals/webpack/dist/build.dev.js
View file @
86a0ccf9
...
...
@@ -18,10 +18,11 @@ var argv = require('../../server/argv');
var
spinner
=
ora
(
'building for production...'
);
// const Diff = require('diff');
spinner
.
start
();
rm
(
argv
.
releasepath
?
path
.
resolve
(
argv
.
releasepath
,
pkg
.
name
.
toLocaleLowerCase
())
:
"./"
.
concat
(
pkg
.
name
.
toLocaleLowerCase
()),
function
(
err
)
{
if
(
err
)
throw
err
;
webpack
(
webpackConfig
,
function
(
err
,
stats
)
{
spinner
.
start
();
// rm(argv.releasepath ? path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase()): `./${pkg.name.toLocaleLowerCase()}`, err => {
// if (err) throw err
// })
webpack
(
webpackConfig
,
function
(
err
,
stats
)
{
spinner
.
stop
();
if
(
err
)
throw
err
;
process
.
stdout
.
write
(
stats
.
toString
({
...
...
@@ -41,5 +42,4 @@ rm(argv.releasepath ? path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase(
console
.
log
(
chalk
.
cyan
(
' Build complete.
\
n'
));
console
.
log
(
chalk
.
yellow
(
' Tip: built files are meant to be served over an HTTP server.
\
n'
+
' Opening index.html over file:// won
\'
t work.
\
n'
));
});
});
\ No newline at end of file
src/app.js
View file @
86a0ccf9
...
...
@@ -44,6 +44,10 @@ const render = () => {
MOUNT_NODE
,
);
};
const
loader
=
(
appContent
,
loading
)
=>
render
({
appContent
,
loading
});
const
initLocale
=
()
=>
{
...
...
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