Giter VIP home page Giter VIP logo

craco-linaria's People

Contributors

dependabot[bot] avatar devanshj avatar guria avatar jedmao avatar jednano avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

craco-linaria's Issues

Are source maps supported?

Hi there,
Thank you for this plugin, it's really useful ๐Ÿ™

I was wondering, did you manage to get the source-maps to work?

The source-map is appended to the CSS file, but devtools doesn't recognize it.
I wonder if I did something wrong or maybe there is a bug?

I would appreciate you help (:

devtools, sourcemaps are not recognized

image

src/.linaria_cache/src/App.linaria.css

.Test_tm0as6w{font-size:3em;color:purple;}
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9hZG1pbi9kZXYvbGluYS9zcmMvQXBwLmpzIl0sIm5hbWVzIjpbIi5UZXN0X3RtMGFzNnciXSwibWFwcGluZ3MiOiJBQUdNQSIsImZpbGUiOiIvVXNlcnMvYWRtaW4vZGV2L2xpbmEvc3JjL0FwcC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgc3R5bGVkIH0gZnJvbSAnbGluYXJpYS9yZWFjdCc7XG5cbmNvbnN0IFRlc3QgPSBzdHlsZWQuZGl2YFxuICBmb250LXNpemU6IDNlbTtcbiAgY29sb3I6IHB1cnBsZTtcbmA7XG5cbmZ1bmN0aW9uIEFwcCgpIHtcbiAgcmV0dXJuIChcbiAgICA8ZGl2IGNsYXNzTmFtZT1cIkFwcFwiPlxuICAgICAgPFRlc3Q+XG4gICAgICAgIFRlc3RcbiAgICAgIDwvVGVzdD5cbiAgICA8L2Rpdj5cbiAgKTtcbn1cblxuZXhwb3J0IGRlZmF1bHQgQXBwO1xuIl19*/

craco.config.js

module.exports = {
  plugins: [
    { plugin: require('craco-linaria') },
  ],
}

linaria.config.js

module.exports = {
  displayName: true
}

Example Repo
https://github.com/asfktz/linaria-craco-no-sourcemap-demo

Removes other `babel-loader` options while appending `linaria/babel` preset

So in the transformBabelLoader function, when linaria/babel preset is pushed to the array it doesn't copy the rest of the options.

https://github.com/jedmao/craco-linaria/blob/aaf5a12cfd65eb41359845b07a27f262199408cf/src/index.js#L77-L79

Should be { ...options, presets: presets.concat('linaria/babel') } instead because the original config has options other than presets

Most importantly it has a plugin that allows imporing .svg as ReactComponent. Thus when craco-linaria plugin is added you can no longer have this feature.

Also I'm a webpack noob tbh, so thank you so much for this plugin! :D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.