Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
alicewriteswrongs committed Jun 29, 2022
1 parent ccb1ab5 commit fc16d42
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/compiler/style/css-imports.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fc16d42

Please sign in to comment.