Commit b8e3b458 by guomingpang

test:将资源文件夹static重命wechat-common-static

parent 36a38734
......@@ -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
......
......@@ -41,7 +41,7 @@ if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
}
// Tools like Cloud9 rely on this.
const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000;
const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3003;
const HOST = process.env.HOST || '0.0.0.0';
if (process.env.HOST) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment