We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 231960a + 1a11419 commit f87e01bCopy full SHA for f87e01b
src/webpack-plugin.ts
@@ -22,6 +22,8 @@
22
23
import type { Compilation, Compiler, Module as WebpackModule } from "webpack";
24
import { sources } from "webpack";
25
+import fs from "fs";
26
+import path from "path";
27
28
interface Asset {
29
name: string;
@@ -108,9 +110,6 @@ export default class CodePressWebpackPlugin {
108
110
109
111
// Always try to read @ alias from tsconfig.json if not already present
112
// resolve.alias usually has Next.js internals but not the @ path alias
- const fs = require("fs");
- const path = require("path");
113
-
114
if (!aliases.has("@")) {
115
const tsconfigPath = path.join(compiler.context, "tsconfig.json");
116
0 commit comments