You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normally we do this in a project (Let's call this project "project-01"):
// In "project-01/my-style.styl":@import"~some-package/index.styl"// This file is required from "project-01/node_modules/some-package/index.styl".
When I started a new project (project-02) with both project-01 and some-package installed:
// In "project-02/my-style.styl":@import"~some-package/index.styl"// This file is required from "project-02/node_modules/some-package/index.styl".// In "project-02/node_modules/project-01/my-style.styl"@import"~some-package/index.styl"// This file is required from "project-02/node_modules/some-package/index.styl".
So in file project-02/node_modules/project-01/my-style.styl,
I finally get project-02/node_modules/some-package/index.styl (Because of starting with "~"),
but what I want is project-02/node_modules/project-01/node_modules/some-package/index.styl, this is the default behavior of most packages.
So how can I do this? Is there any offical way to change this behavior?
Many thanks :)
The text was updated successfully, but these errors were encountered:
You need to put project-01 in package.json for project-02
project-01 should use stylus/styl property in package.json to export styles (alternative you can use the exports property of package.json, only webpack@5)
Normally we do this in a project (Let's call this project "project-01"):
When I started a new project (project-02) with both
project-01
andsome-package
installed:So in file
project-02/node_modules/project-01/my-style.styl
,I finally get
project-02/node_modules/some-package/index.styl
(Because of starting with "~"),but what I want is
project-02/node_modules/project-01/node_modules/some-package/index.styl
, this is the default behavior of most packages.So how can I do this? Is there any offical way to change this behavior?
Many thanks :)
The text was updated successfully, but these errors were encountered: