Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wechat-common
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
wechat-common
Commits
b8e3b458
Commit
b8e3b458
authored
Aug 02, 2021
by
guomingpang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test:将资源文件夹static重命wechat-common-static
parent
36a38734
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
config/webpack.config.js
+9
-9
scripts/start.js
+1
-1
No files found.
config/webpack.config.js
View file @
b8e3b458
...
...
@@ -24,7 +24,7 @@ const getClientEnvironment = require('./env');
const
ModuleNotFoundPlugin
=
require
(
'react-dev-utils/ModuleNotFoundPlugin'
);
const
ForkTsCheckerWebpackPlugin
=
require
(
'react-dev-utils/ForkTsCheckerWebpackPlugin'
);
const
typescriptFormatter
=
require
(
'react-dev-utils/typescriptFormatter'
);
var
PREFIX
=
'wechect-common-'
const
postcssNormalize
=
require
(
'postcss-normalize'
);
const
appPackageJson
=
require
(
paths
.
appPackageJson
);
...
...
@@ -175,14 +175,14 @@ module.exports = function(webpackEnv) {
// There will be one main bundle, and one file per asynchronous chunk.
// In development, it does not produce real files.
filename
:
isEnvProduction
?
'static/js/[name].[contenthash:8].js'
:
isEnvDevelopment
&&
'static/js/bundle.js'
,
?
PREFIX
+
'static/js/[name].[contenthash:8].js'
:
isEnvDevelopment
&&
PREFIX
+
'static/js/bundle.js'
,
// TODO: remove this when upgrading to webpack 5
futureEmitAssets
:
true
,
// There are also additional JS chunk files if you use code splitting.
chunkFilename
:
isEnvProduction
?
'static/js/[name].[contenthash:8].chunk.js'
:
isEnvDevelopment
&&
'static/js/[name].chunk.js'
,
?
PREFIX
+
'static/js/[name].[contenthash:8].chunk.js'
:
isEnvDevelopment
&&
PREFIX
+
'static/js/[name].chunk.js'
,
// webpack uses `publicPath` to determine where the app is being served from.
// It requires a trailing slash, or the file assets will get an incorrect path.
// We inferred the "public path" (such as / or /my-project) from homepage.
...
...
@@ -370,7 +370,7 @@ module.exports = function(webpackEnv) {
loader
:
require
.
resolve
(
'url-loader'
),
options
:
{
limit
:
imageInlineSizeLimit
,
name
:
'static/media/[name].[hash:8].[ext]'
,
name
:
PREFIX
+
'static/media/[name].[hash:8].[ext]'
,
},
},
// Process application JS with Babel.
...
...
@@ -505,7 +505,7 @@ module.exports = function(webpackEnv) {
// by webpacks internal loaders.
exclude
:
[
/
\.(
js|mjs|jsx|ts|tsx
)
$/
,
/
\.
html$/
,
/
\.
json$/
],
options
:
{
name
:
'static/media/[name].[hash:8].[ext]'
,
name
:
PREFIX
+
'static/media/[name].[hash:8].[ext]'
,
},
},
// ** STOP ** Are you adding a new loader?
...
...
@@ -578,8 +578,8 @@ module.exports = function(webpackEnv) {
new
MiniCssExtractPlugin
({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename
:
'static/css/[name].[contenthash:8].css'
,
chunkFilename
:
'static/css/[name].[contenthash:8].chunk.css'
,
filename
:
PREFIX
+
'static/css/[name].[contenthash:8].css'
,
chunkFilename
:
PREFIX
+
'static/css/[name].[contenthash:8].chunk.css'
,
}),
// Generate an asset manifest file with the following content:
// - "files" key: Mapping of all asset filenames to their corresponding
...
...
scripts/start.js
View file @
b8e3b458
...
...
@@ -41,7 +41,7 @@ if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
}
// Tools like Cloud9 rely on this.
const
DEFAULT_PORT
=
parseInt
(
process
.
env
.
PORT
,
10
)
||
300
0
;
const
DEFAULT_PORT
=
parseInt
(
process
.
env
.
PORT
,
10
)
||
300
3
;
const
HOST
=
process
.
env
.
HOST
||
'0.0.0.0'
;
if
(
process
.
env
.
HOST
)
{
...
...
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