Cant resolve .linariacache
See original GitHub issueDo you want to request a feature or report a bug? bug
What is the current behavior?
webpack throws error
Can’t resolve ‘C:my-project.linaria-cachesrcApp.linaria.css’ in ‘C:\my-project\src’
configuration
.babelrc
{ "presets": [ "@babel/preset-env", "@babel/preset-typescript", "@babel/preset-react", "linaria/babel" ], "plugins": [ ["@babel/plugin-proposal-decorators", { "legacy": true }], ["@babel/plugin-proposal-class-properties", { "loose": true }], "react-hot-loader/babel" ] }
rules for webpack
{ test: /\.css$/, use: [ { loader: 'style-loader' }, { loader: 'css-loader', options: { sourceMap: !isProd, }, }, ], }, { test: /\.(j|t)sx?$/, exclude: /node_modules/, use: [ { loader: 'babel-loader' }, { loader: 'linaria/loader', options: { sourceMap: !isProd }, } ]
“linaria”: “^1.0.0-beta.0” “webpack”: “^4.23.1”,
OS - windows 10
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@satya164 Yes, seems to be working fine. Thanks for looking into it!
Maybe it’s how Webpack handles absolute paths on Windows? From this issue, looks like we need to escape the slashes: https://github.com/webpack/webpack/issues/66
So we need to insert:
C:\\my-project\\.linaria-cache\\src\\App.linaria.css
instead ofC:\my-project\.linaria-cache\src\App.linaria.css
.Can you try this branch and tell me if it works @mfarhadpur? https://github.com/callstack/linaria/tree/%40satya164/win-path