Code Monkey home page Code Monkey logo

Comments (4)

matthewdavidson avatar matthewdavidson commented on June 9, 2024

Hi @Nerogee! Have a look at backpack-react-scripts - it's a fork of Facebook's Create React App with tweaks to the webpack configuration in order to support backpack components out of the box.

You can check out the webpack configuration inside (have a look in the dev and prod configs). Essentially we have added in a custom regex to include backpack components in babel-loader as well as sass compilation support. See this guide for more details.

Hope this helps!

from backpack.

matthewdavidson avatar matthewdavidson commented on June 9, 2024

Closing due to inactivity - feel free to reopen if you need info!

from backpack.

georgegillams avatar georgegillams commented on June 9, 2024

Hey @Nerogee

I appreciate it's a while since you raised this, so might not be at all relevant, but I've published an experimental package called backpack-transpiled which contains all the backpack React components, and uses transpiled js and CSS.

You can check it out here.
https://www.npmjs.com/package/backpack-transpiled

Usage is the same as documented on backpack.github.io, except you have to import from subdirectories within the package. eg:

import BpkButton from 'backpack-transpiled/bpk-component-button';

As I said it's experimental for now, and not officially supported by Backpack or Skyscanner, but it might help 🤷

from backpack.

Amantel avatar Amantel commented on June 9, 2024

This is kinda sad that there are no guides (at least I have found none) that can help in this task. Most links from @matthewdavidson comment do not work at this point.
There is one webpack config now, but personally I have no idea what part of it should I merge to the nextjs one we are using.

from backpack.

Related Issues (20)

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.