fix: source maps (#2787)

This commit is contained in:
Niklas von Hertzen 2022-01-02 16:08:10 +08:00 committed by GitHub
parent 9fda3e1ede
commit 46db86755f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ export default {
// Allow json resolution // Allow json resolution
json(), json(),
// Compile TypeScript files // Compile TypeScript files
typescript(), typescript({ sourceMap: true, inlineSources: true }),
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs) // Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
commonjs({ commonjs({
include: 'node_modules/**' include: 'node_modules/**'

View File

@ -12,7 +12,7 @@ const mkdirp = require('mkdirp');
export const app = express(); export const app = express();
app.use('/', serveIndex(path.resolve(__dirname, '../'), {icons: true})); app.use('/', serveIndex(path.resolve(__dirname, '../'), {icons: true}));
app.use('/', express.static(path.resolve(__dirname, '../'))); app.use([/^\/src($|\/)/, '/'], express.static(path.resolve(__dirname, '../')));
export const corsApp = express(); export const corsApp = express();
corsApp.use('/proxy', proxy()); corsApp.use('/proxy', proxy());