Skip to content

Commit 50d8508

Browse files
committed
add comment
1 parent 8399e67 commit 50d8508

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/next/next-devtools-inject-tailwind.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// This code runs on the browser.
2+
// The options.target is provided from shadow-portal.tsx file.
13
function insertIntoTarget(element, options) {
24
var root =
35
options.target ||

packages/next/src/next-devtools/dev-overlay/components/shadow-portal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export function ShadowPortal({ children }: { children: React.ReactNode }) {
3838
shadowNode.current = portalNode.current.attachShadow({ mode: 'open' })
3939

4040
// Injecting Tailwind to the Shadow DOM with Webpack style-loader.
41+
// The target is passed to the next-devtools-inject-tailwind.js file which runs on the browser.
4142
// x-ref: https://webpack.js.org/loaders/style-loader/#lazystyletag
4243
tailwindCss.use({
4344
target: shadowNode.current,

0 commit comments

Comments
 (0)