People will tell you it's an antipattern, but what if a library needs you to do this?

Table of contents

    Webpack's raw-loader package can be used to load any file into a string. Experience tells us that sometimes it's just the only way to make something work...

    After adding it to your project's devDependencies, you might run into this issue: how to configure it in my create-react-app project where there's no webpack.config.js file accessible?

    It turns out that Webpack has a concept of inline loader usage with import prefixes:

    /* eslint import/no-webpack-loader-syntax: off */
    import styleAsString from '!!raw-loader!../styles/foo.css';

    This will load the raw contents of foo.css into a variable. Since create-react-app has a very strict linter that isn't happy with this, a directive to suppress the linter's objection is needed, too.

    Michał Buszkiewicz, Elixir Developer
    Michał Buszkiewicz Curiosum Founder & CTO

    Read more
    on #curiosum blog

    Introducing Kanta - the ultimate solution to translations in Elixir web apps

    Introducing Kanta - the ultimate solution to translations in Elixir & Phoenix web apps

    Handling translations in web applications can be a challenging and time-consuming task. The process entails managing various files, tracking modifications, and ensuring that translations remain current as the project progresses. These complexities can slow down development and introduce errors. That’s why we decided to create an open source solution: Kanta. In this blog post, we’ll explore the problem of managing translations in web apps, and how Kanta simplifies the process. We’ll also compare it with other translation management tools and delve into its powerful plugins.