Let \(\Gamma \) be a compact codimension-two submanifold of \({\mathbb {R}}^n\) , and let L be a nontrivial real line bundle over \(X = {\mathbb {R}}^n {\setminus } \Gamma \) . We study the Allen–Cahn functional, \(\begin{aligned}E_\varepsilon (u) = \int _X \varepsilon \frac{|\nabla u|^2}{2} + \frac{(1-|u|^2)^2}{4\varepsilon }\,dx, \\\end{aligned}\) on the space of sections u of L. Specifically, we are interested in critical sections for this functional and their relation to minimal hypersurfaces with boundary equal to \(\Gamma \) . We first show that, for a family of critical sections with uniformly bounded energy, in the limit as \(\varepsilon \rightarrow 0\) , the associated family of energy measures converges to an integer rectifiable \((n-1)\) -varifold V. Moreover, V is stationary with respect to any variation which leaves \(\Gamma \) fixed. Away from \(\Gamma \) , this follows from work of Hutchinson–Tonegawa; our result extends their interior theory up to the boundary \(\Gamma \) . Under additional hypotheses, we can say more about V. When V arises as a limit of critical sections with uniformly bounded Morse index, \(\Sigma := {{\,\textrm{supp}\,}}\Vert V\Vert \) is a minimal hypersurface, smooth away from \(\Gamma \) and a singular set of Hausdorff dimension at most \(n-8\) . If the sections are globally energy minimizing and \(n = 3\) , then \(\Sigma \) is a smooth surface with boundary, \(\partial \Sigma = \Gamma \) (at least if L is chosen correctly), and \(\Sigma \) has least area among all surfaces with these properties. We thus obtain a new proof (originally suggested in a paper of Fröhlich and Struwe) that the smooth version of Plateau’s problem admits a solution for every boundary curve in \({\mathbb {R}}^3\) . This also works if \(4 \le n\le 7\) and \(\Gamma \) is assumed to lie in a strictly convex hypersurface.