0.3.4 • Published 2 years ago
@vbait/react-scripts v0.3.4
react-scripts
This package includes scripts and configuration used by Create React App. Please refer to its documentation:
- Getting Started – How to create a new app.
- User Guide – How to develop apps bootstrapped with Create React App.
- Getting Started – How to create a new app.
- User Guide – How to develop apps bootstrapped with Create React App.
Extra ENV Variables
- USE_CONTENTHASH:
boolean
- true by default - USE_CHUNK_CONTENTHASH:
boolean
- true by default - USE_MANIFEST:
boolean
- true by default - CHUNK_FILENAME:
string
- '.chunk' by default - ASSETS_PATH:
string
- 'static/' by default - GENERATE_HTML:
boolean
- true by default
If it isn't enough then you can extend your webpack config with file
<root>/webpack.extend.js
or <root>/webpack.server.extend.js
How to use it:
// webpack.extend.js
module.exports = (config, options) => {
// change or create new config here
return config;
};
// webpack.server.extend.js
module.exports = (serverConfig, options) => {
// change or create new config here
return config;
};
Options:
const options = {
webpack,
isEnvDevelopment,
isEnvProduction,
useTypeScript,
useTailwind,
hasJsxRuntime,
assetsPath,
paths,
// extra
chunkFilename,
imageInlineSizeLimit,
shouldInlineRuntimeChunk,
shouldUseContentHash,
shouldUseChunkContentHash,
shouldUseManifest,
shouldGenerateHtml,
shouldUseReactRefresh,
// plugins
plugins: {
MiniCssExtractPlugin,
ESLintPlugin,
HtmlWebpackPlugin,
},
};
Options for webpack.sever.extend:
const options = {
config, // webpack config
paths,
};
How to use
npx create-react-app my-app --scripts-version @vbait/react-scripts --template cra-template-ab-typescript
0.3.4
2 years ago
0.3.3
2 years ago
0.3.2
2 years ago
0.3.1
2 years ago
0.2.5
2 years ago
0.3.0
3 years ago
0.2.4
2 years ago
0.2.3
3 years ago
0.2.2
3 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.1.9
3 years ago
0.1.8
3 years ago
0.1.7
3 years ago
0.1.4
3 years ago
0.1.6
3 years ago
0.1.5
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago
0.0.8
4 years ago
0.0.5
4 years ago
0.0.7
4 years ago
0.0.1
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago
0.0.4
4 years ago
4.0.2
4 years ago
4.0.1
4 years ago
4.0.0
4 years ago