Coder Social home page Coder Social logo

karlhepler / create-react-app-ejected-bazel Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 455 KB

This is a test project to try to figure out how to get an ejected create-react-app project building with Bazel.

License: MIT License

HTML 2.22% CSS 1.20% TypeScript 2.58% JavaScript 87.14% Starlark 6.87%

create-react-app-ejected-bazel's Introduction

create-react-app-ejected-bazel

The purpose of this repo is to demonstrate an issue I'm having with Bazel and an ejected create-react-app project.

Baseline Context

When a create-react-app project is ejected, config/ and scripts/ directories are created and filled with files. You will notice that the build script in package.json looks like this: node scripts/build.js. If you run yarn build, then you will see that a build/ directory is created in the source root and that it is filled with output files.

Integrating Bazel

  1. I added WORKSPACE and BUILD.bazel files and set everything up to build correctly with Bazel.

  2. If you run git checkout 5517901ab51bf4110aa1c50049b358fd6957048e && yarn bazelisk clean && yarn bazelisk run //:build, you will notice that the scripts/build.js is executed by Bazel. However, instead of outputting a build/ directory in the source root, it outputs a build/ directory here: bazel-bin/build.sh.runfiles/create-react-app-ejected-bazel/build.

  3. If you run git checkout 217ff3953df9ee09929717ef0ee8e30713671c37 && yarn bazelisk clean && yarn bazelisk build //:bundle, you will notice that everything builds correctly and outputs to bazel-bin/bundle/ as expected.

Problem

If you run git checkout c6a4e62053d3d4fd3c294752e3a19d2be7556484 && yarn bazelisk clean && yarn bazelisk build //project:bundle, you will notice that it doesn't build. I can't figure it out. I've tried to get this working for days.

I expect it to output bazel-bin/project/bundle/ full of output files.

create-react-app-ejected-bazel's People

Contributors

karlhepler avatar

Watchers

 avatar  avatar

create-react-app-ejected-bazel's Issues

Add fix

Any chance you could update this repo with the fix?

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.