mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 08:36:33 +03:00
chore: disable source-maps for css loader
This commit is contained in:
parent
384c883bb8
commit
3fabce4d19
|
@ -16,13 +16,11 @@ const REVISION = JSON.stringify(
|
||||||
.trim(),
|
.trim(),
|
||||||
);
|
);
|
||||||
|
|
||||||
const BANNER =
|
const BANNER = `ReDoc - OpenAPI/Swagger-generated API Reference Documentation
|
||||||
`ReDoc - OpenAPI/Swagger-generated API Reference Documentation
|
|
||||||
-------------------------------------------------------------
|
-------------------------------------------------------------
|
||||||
Version: ${VERSION}
|
Version: ${VERSION}
|
||||||
Repo: https://github.com/Rebilly/ReDoc`;
|
Repo: https://github.com/Rebilly/ReDoc`;
|
||||||
|
|
||||||
|
|
||||||
export default (env: { standalone?: boolean } = {}) => ({
|
export default (env: { standalone?: boolean } = {}) => ({
|
||||||
entry: env.standalone ? ['./src/polyfills.ts', './src/standalone.tsx'] : './src/index.ts',
|
entry: env.standalone ? ['./src/polyfills.ts', './src/standalone.tsx'] : './src/index.ts',
|
||||||
output: {
|
output: {
|
||||||
|
@ -51,14 +49,14 @@ export default (env: { standalone?: boolean } = {}) => ({
|
||||||
|
|
||||||
externals: env.standalone
|
externals: env.standalone
|
||||||
? {
|
? {
|
||||||
esprima: 'esprima',
|
esprima: 'esprima',
|
||||||
'node-fetch': 'null',
|
'node-fetch': 'null',
|
||||||
}
|
}
|
||||||
: (context, request, callback) => {
|
: (context, request, callback) => {
|
||||||
// ignore node-fetch dep of swagger2openapi as it is not used
|
// ignore node-fetch dep of swagger2openapi as it is not used
|
||||||
if (/node-fetch$/i.test(request)) return callback(null, 'var undefined');
|
if (/node-fetch$/i.test(request)) return callback(null, 'var undefined');
|
||||||
return nodeExternals(context, request, callback);
|
return nodeExternals(context, request, callback);
|
||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
|
@ -92,7 +90,7 @@ export default (env: { standalone?: boolean } = {}) => ({
|
||||||
use: {
|
use: {
|
||||||
loader: 'css-loader',
|
loader: 'css-loader',
|
||||||
options: {
|
options: {
|
||||||
sourceMap: true,
|
sourceMap: false,
|
||||||
minimize: true,
|
minimize: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -106,6 +104,6 @@ export default (env: { standalone?: boolean } = {}) => ({
|
||||||
__REDOC_REVISION__: REVISION,
|
__REDOC_REVISION__: REVISION,
|
||||||
}),
|
}),
|
||||||
new ForkTsCheckerWebpackPlugin({ silent: true }),
|
new ForkTsCheckerWebpackPlugin({ silent: true }),
|
||||||
new webpack.BannerPlugin(BANNER)
|
new webpack.BannerPlugin(BANNER),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user