diff --git a/src/compiler/style/css-imports.ts b/src/compiler/style/css-imports.ts index c4aeec35f365..79593a789565 100644 --- a/src/compiler/style/css-imports.ts +++ b/src/compiler/style/css-imports.ts @@ -1,5 +1,5 @@ import type * as d from '../../declarations'; -import { basename, dirname, isAbsolute, join, relative } from 'path'; +import { basename, dirname, isAbsolute, join } from 'path'; import { buildError, normalizePath } from '@utils'; import { getModuleId } from '../sys/resolve/resolve-utils'; import { parseStyleDocs } from '../docs/style-docs'; @@ -269,23 +269,6 @@ export const isLocalCssImport = (srcImport: string) => { return true; }; -export const replaceNodeModuleUrl = ( - baseCssFilePath: string, - moduleId: string, - nodeModulePath: string, - url: string -) => { - nodeModulePath = normalizePath(dirname(nodeModulePath)); - url = normalizePath(url); - - const absPathToNodeModuleCss = normalizePath(url.replace(`~${moduleId}`, nodeModulePath)); - - const baseCssDir = normalizePath(dirname(baseCssFilePath)); - - const relToRoot = normalizePath(relative(baseCssDir, absPathToNodeModuleCss)); - return relToRoot; -}; - /** * Replace import declarations (like '@import "foobar";') with the actual CSS * written in the imported module, allowing us to produce a single file from a