We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const { override, addDecoratorsLegacy, disableEsLint, addBundleVisualizer, addWebpackAlias, addWebpackPlugin, addWebpackResolve, adjustWorkbox, addLessLoader, fixBabelImports, addBabelPlugins, } = require('customize-cra');
const path = require('path'); const CompressionPlugin = require('compression-webpack-plugin'); const progressplugin = require('progress-bar-webpack-plugin');
module.exports = override( addWebpackResolve({ //导入文件不用添加文件的后缀名 extensions: ['.tsx', '.ts', '.js', '.jsx', '.json'], }), addDecoratorsLegacy(), disableEsLint(), addBundleVisualizer({}, true), addWebpackAlias({ '@': path.resolve(__dirname, 'src'), components: path.resolve(__dirname, 'src/components'), assets: path.resolve(__dirname, 'src/assets'), }), addWebpackPlugin( new CompressionPlugin({ filename: '[path].gz[query]', test: /.js$|.css$/, threshold: 1024, minRatio: 0.8, deleteOriginalAssets: false, }) ), addWebpackPlugin(new progressplugin()), adjustWorkbox((wb) => Object.assign(wb, { skipWaiting: true, exclude: (wb.exclude || []).concat('index.html'), }) ), fixBabelImports('import', { libraryName: 'antd', style: true, }), addLessLoader({ localIdentName: '[local]--[hash:base64:8]', javascriptEnabled: true, modifyVars: {}, }), ...addBabelPlugins(['@babel/plugin-proposal-optional-chaining']) );
The text was updated successfully, but these errors were encountered:
No branches or pull requests
const {
override,
addDecoratorsLegacy,
disableEsLint,
addBundleVisualizer,
addWebpackAlias,
addWebpackPlugin,
addWebpackResolve,
adjustWorkbox,
addLessLoader,
fixBabelImports,
addBabelPlugins,
} = require('customize-cra');
const path = require('path');
const CompressionPlugin = require('compression-webpack-plugin');
const progressplugin = require('progress-bar-webpack-plugin');
module.exports = override(
addWebpackResolve({
//导入文件不用添加文件的后缀名
extensions: ['.tsx', '.ts', '.js', '.jsx', '.json'],
}),
addDecoratorsLegacy(),
disableEsLint(),
addBundleVisualizer({}, true),
addWebpackAlias({
'@': path.resolve(__dirname, 'src'),
components: path.resolve(__dirname, 'src/components'),
assets: path.resolve(__dirname, 'src/assets'),
}),
addWebpackPlugin(
new CompressionPlugin({
filename: '[path].gz[query]',
test: /.js$|.css$/,
threshold: 1024,
minRatio: 0.8,
deleteOriginalAssets: false,
})
),
addWebpackPlugin(new progressplugin()),
adjustWorkbox((wb) =>
Object.assign(wb, {
skipWaiting: true,
exclude: (wb.exclude || []).concat('index.html'),
})
),
fixBabelImports('import', {
libraryName: 'antd',
style: true,
}),
addLessLoader({
localIdentName: '[local]--[hash:base64:8]',
javascriptEnabled: true,
modifyVars: {},
}),
...addBabelPlugins(['@babel/plugin-proposal-optional-chaining'])
);
The text was updated successfully, but these errors were encountered: