mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-06 05:10:20 +03:00
fix: resolve other packages like empty
This commit is contained in:
parent
d2ae3186b9
commit
fe7b76a9b0
|
@ -44,7 +44,7 @@
|
||||||
"bundle:standalone": "webpack --env production --env standalone --mode=production",
|
"bundle:standalone": "webpack --env production --env standalone --mode=production",
|
||||||
"bundle:lib": "webpack --mode=production && npm run declarations",
|
"bundle:lib": "webpack --mode=production && npm run declarations",
|
||||||
"bundle:browser": "webpack --env production --env browser --mode=production",
|
"bundle:browser": "webpack --env production --env browser --mode=production",
|
||||||
"bundle": "npm run bundle:clean && npm run bundle:lib && npm run bundle:standalone && npm run bundle:browser",
|
"bundle": "npm run bundle:clean && npm run bundle:lib && npm run bundle:browser && npm run bundle:standalone",
|
||||||
"declarations": "tsc --emitDeclarationOnly -p tsconfig.lib.json && cp -R src/types typings/",
|
"declarations": "tsc --emitDeclarationOnly -p tsconfig.lib.json && cp -R src/types typings/",
|
||||||
"stats": "webpack --env production --env standalone --json --profile --mode=production > stats.json",
|
"stats": "webpack --env production --env standalone --json --profile --mode=production > stats.json",
|
||||||
"prettier": "prettier --write \"cli/index.ts\" \"src/**/*.{ts,tsx}\"",
|
"prettier": "prettier --write \"cli/index.ts\" \"src/**/*.{ts,tsx}\"",
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
module.exports = {}
|
|
|
@ -1,12 +1,5 @@
|
||||||
import * as lunr from 'lunr';
|
import * as lunr from 'lunr';
|
||||||
|
|
||||||
try {
|
|
||||||
// tslint:disable-next-line
|
|
||||||
require('core-js/es/promise'); // bundle into worker
|
|
||||||
} catch (_) {
|
|
||||||
// nope
|
|
||||||
}
|
|
||||||
|
|
||||||
/* just for better typings */
|
/* just for better typings */
|
||||||
export default class Worker {
|
export default class Worker {
|
||||||
add: typeof add = add;
|
add: typeof add = add;
|
||||||
|
|
|
@ -47,12 +47,12 @@ export default (env: { standalone?: boolean, browser?: boolean } = {}) => ({
|
||||||
fallback: {
|
fallback: {
|
||||||
path: require.resolve('path-browserify'),
|
path: require.resolve('path-browserify'),
|
||||||
http: false,
|
http: false,
|
||||||
fs: env.browser ? path.resolve(__dirname, 'src/fs.empty.js') : false,
|
fs: env.browser ? path.resolve(__dirname, 'src/empty.js') : false,
|
||||||
os: false,
|
os: path.resolve(__dirname, 'src/empty.js'),
|
||||||
|
tty: path.resolve(__dirname, 'src/empty.js'),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
performance: false,
|
performance: false,
|
||||||
// target: 'node',
|
|
||||||
externalsPresets: env.standalone || env.browser ? {} : { node: true },
|
externalsPresets: env.standalone || env.browser ? {} : { node: true },
|
||||||
externals: env.standalone
|
externals: env.standalone
|
||||||
? {
|
? {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user