Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip edge compiler in next 12 #59

Merged
merged 1 commit into from
Jun 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/next-plugin-preact/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = function withPreact(nextConfig = {}) {
return withPrefresh(
Object.assign({}, nextConfig, {
webpack(config, options) {
const { dev, isServer, defaultLoaders } = options;
const { dev, isServer, nextRuntime, defaultLoaders } = options;

// Disable package exports field resolution in webpack. It can lead
// to dual package hazards where packages are imported twice: One
Expand Down Expand Up @@ -58,7 +58,7 @@ module.exports = function withPreact(nextConfig = {}) {
aliases['react-ssr-prepass'] = 'preact-ssr-prepass';

// Automatically inject Preact DevTools
if (dev) {
if (dev && nextRuntime !== 'edge') {
const prependToEntry = isServer ? 'pages/_document' : 'main.js';

const rtsVersion = require('preact-render-to-string/package.json')
Expand Down