25 lines
680 B
JavaScript
25 lines
680 B
JavaScript
|
|
'use strict';
|
||
|
|
|
||
|
|
const rspackConfigModule = require('@cqsjjb/scripts/rspack.config');
|
||
|
|
|
||
|
|
const baseConfig = rspackConfigModule.default || rspackConfigModule;
|
||
|
|
const patchedConfig = {
|
||
|
|
...baseConfig,
|
||
|
|
// pdfjs-dist ships a prebundled pdf.mjs that declares __webpack_exports__.
|
||
|
|
// eval-based source maps hoist that symbol and break module initialization.
|
||
|
|
devtool: 'source-map',
|
||
|
|
};
|
||
|
|
|
||
|
|
const rspackConfigPath = require.resolve('@cqsjjb/scripts/rspack.config');
|
||
|
|
require.cache[rspackConfigPath] = {
|
||
|
|
id: rspackConfigPath,
|
||
|
|
filename: rspackConfigPath,
|
||
|
|
loaded: true,
|
||
|
|
exports: {
|
||
|
|
__esModule: true,
|
||
|
|
default: patchedConfig,
|
||
|
|
},
|
||
|
|
};
|
||
|
|
|
||
|
|
require('@cqsjjb/scripts/rspack.dev.server');
|