diff --git a/packages/remix-dev/compiler/compileBrowser.ts b/packages/remix-dev/compiler/compileBrowser.ts index 0bda1e97809..523b1efc00d 100644 --- a/packages/remix-dev/compiler/compileBrowser.ts +++ b/packages/remix-dev/compiler/compileBrowser.ts @@ -16,7 +16,6 @@ import type { CompileOptions } from "./options"; import { browserRouteModulesPlugin } from "./plugins/browserRouteModulesPlugin"; import { browserRouteModulesPlugin as browserRouteModulesPlugin_v2 } from "./plugins/browserRouteModulesPlugin_v2"; import { cssFilePlugin } from "./plugins/cssFilePlugin"; -import { deprecatedRemixPackagePlugin } from "./plugins/deprecatedRemixPackagePlugin"; import { emptyModulesPlugin } from "./plugins/emptyModulesPlugin"; import { mdxPlugin } from "./plugins/mdx"; import { urlImportsPlugin } from "./plugins/urlImportsPlugin"; @@ -102,7 +101,6 @@ const createEsbuildConfig = ( let outputCss = isCssBuild; let plugins: esbuild.Plugin[] = [ - deprecatedRemixPackagePlugin(options.onWarning), isCssBuild ? cssBundleEntryModulePlugin(config) : null, cssModulesPlugin({ config, mode, outputCss }), config.future.unstable_vanillaExtract diff --git a/packages/remix-dev/compiler/compilerServer.ts b/packages/remix-dev/compiler/compilerServer.ts index 7369b7e8dff..bb9ced1ab94 100644 --- a/packages/remix-dev/compiler/compilerServer.ts +++ b/packages/remix-dev/compiler/compilerServer.ts @@ -13,7 +13,6 @@ import { cssModulesPlugin } from "./plugins/cssModulesPlugin"; import { cssSideEffectImportsPlugin } from "./plugins/cssSideEffectImportsPlugin"; import { vanillaExtractPlugin } from "./plugins/vanillaExtractPlugin"; import { cssFilePlugin } from "./plugins/cssFilePlugin"; -import { deprecatedRemixPackagePlugin } from "./plugins/deprecatedRemixPackagePlugin"; import { emptyModulesPlugin } from "./plugins/emptyModulesPlugin"; import { mdxPlugin } from "./plugins/mdx"; import { serverAssetsManifestPlugin } from "./plugins/serverAssetsManifestPlugin"; @@ -52,7 +51,6 @@ const createEsbuildConfig = ( let outputCss = false; let plugins: esbuild.Plugin[] = [ - deprecatedRemixPackagePlugin(options.onWarning), cssModulesPlugin({ config, mode, outputCss }), config.future.unstable_vanillaExtract ? vanillaExtractPlugin({ config, mode, outputCss }) diff --git a/packages/remix-dev/compiler/plugins/deprecatedRemixPackagePlugin.ts b/packages/remix-dev/compiler/plugins/deprecatedRemixPackagePlugin.ts deleted file mode 100644 index 80de228c150..00000000000 --- a/packages/remix-dev/compiler/plugins/deprecatedRemixPackagePlugin.ts +++ /dev/null @@ -1,29 +0,0 @@ -import path from "path"; -import type { Plugin } from "esbuild"; - -/** - * A plugin to warn users when importing from the deprecated `remix` package - */ -export function deprecatedRemixPackagePlugin( - onWarning?: (warning: string, key: string) => void -): Plugin { - return { - name: "deprecated-remix-package", - setup(build) { - build.onResolve({ filter: /.*/ }, ({ importer, path: filePath }) => { - // Warn on deprecated imports from the remix package - if (filePath === "remix") { - let relativePath = path.relative(process.cwd(), importer); - let warningMessage = - `WARNING: All \`remix\` exports are considered deprecated as of v1.3.3. ` + - `Please change your import in "${relativePath}" to come from the respective ` + - `underlying \`@remix-run/*\` package. ` + - `Run \`npx @remix-run/dev@latest codemod replace-remix-magic-imports\` ` + - `to automatically migrate your code.`; - onWarning?.(warningMessage, importer); - } - return undefined; - }); - }, - }; -}