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
Hi, I have not fully tested this but the basic concept seems to work as far as I have tried it.
There is currently a pretty big issue regarding including less and scss files from node packages because most of them are compiled into different directories than where the src file resides. This messes with relative resources. With this minor change people can specify a rel path to trick relative resources to load relative to the supplied path.
example usage:
```
module: {
loaders: [
{
test: /\.less$/,
loader: ["style-loader", "css-loader", "less-loader"],
exclude: [
/\package\/less\/style.less$/
]
},
{
test: /\package\/less\/style.less$/,
loader: [
"style-loader",
"css-loader?rel="+path.resolve(__dirname,'path/to/package/dist/css'),
"less-loader"
]
}
]
}
```
I just pulled the regx code off of stack overflow. Not sure what the best practice is to detect if a path is relative in javascript.
0 commit comments