diff --git a/packages/cli/src/plugins/resource/plugin-standard-css.js b/packages/cli/src/plugins/resource/plugin-standard-css.js index bef4c94cf..cf2161c1c 100644 --- a/packages/cli/src/plugins/resource/plugin-standard-css.js +++ b/packages/cli/src/plugins/resource/plugin-standard-css.js @@ -57,7 +57,14 @@ function bundleCss(body, sourceUrl, compilation, workingUrl) { const { basePath } = compilation.config; - // TODO document our resolution strategy here + /* + * Our resolution algorithm works as follows: + * 1. First, check if it is a shortcut alias to node_modules, in which we use Node's resolution algorithm + * 2. Next, check if it is an absolute path "escape" hatch based path and just resolve to the user's workspace + * 3. If there is a workingUrl, then just join the current value with the current working file we're processing + * 4. If the starting file is in the scratch directory, likely means it is just an extracted inline