123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- const withMDX = require('@next/mdx')({
- extension: /\.mdx?$/,
- options: {
-
-
- jsx: true,
- },
- });
- module.exports = withMDX({
- basePath: '/ya-webadb/apps/demo/out',
- pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx'],
- reactStrictMode: false,
- productionBrowserSourceMaps: true,
- staticPageGenerationTimeout: 2000,
- experimental: {
-
- esmExternals: 'loose',
- },
- publicRuntimeConfig: {
- basePath: '/ya-webadb/apps/demo/out',
- },
- webpack(config, options) {
- config.module.rules.push({
- resourceQuery: /url/,
- type: "asset/resource",
- generator: {
- filename: "static/chunks/[name].[hash][ext]",
- },
- });
- config.module.rules.push({
- test: /.*\.m?js$/,
-
-
-
-
-
-
- exclude: [
- /next/,
- ],
- use: ['source-map-loader'],
-
- });
- config.module.rules.push(
- {
- enforce: 'pre',
- test: /\.html$/,
- loader: 'html-loader',
- }
- );
-
- return config;
- },
- async headers() {
- return [
- {
- source: '/:path*',
- headers: [
- {
- key: 'Cross-Origin-Opener-Policy',
- value: 'same-origin',
- },
- {
- key: 'Cross-Origin-Embedder-Policy',
- value: 'require-corp',
- }
- ]
- }
- ]
- }
- });
|