Git Product home page Git Product logo

rules_node's Introduction

Node Rules for Bazel (unsupported)

Rules Description
node_binary Creates a node binary.
node_library Groups node.js sources and deps together.
npm_library Defines an external npm module.
node_internal_module Create an internal node module that can be required as require('module_name').
webpack_build Build JS/CSS/etc with webpack.
node_build Build JS/CSS/etc with a node binary.
mocha_test Defines a node test that uses mocha.
node_test Defines a basic node test.

Overview

These rules are a public copy of what we're using at Dropbox. We open sourced them because we think the community will benefit from seeing how we've done things, but they are not supported. Pull requests are welcome, though!

We encourage you use the officially sanctioned nodejs or typescript rules instead, if possible!

A brief overview:

  • node_binary, node_library, mocha_test, node_test all work the way you would expect them to.

  • npm_library downloads npm modules from the public npm repository. We have a fair amount of tooling within Dropbox to support this rule, with a private mirror and way to generate npm_library rules. Simpler versions of those tools are included in node/tools/npm. If you're using this rule for serious development, you should replace the npm_installer with something that pulls from an internal mirror.

  • webpack_build uses webpack to build js/css files. Making the experience of using webpack better within Dropbox was one of the reasons we wrote these rules.

  • node_internal_module is used to create an "internal" node module so that you can easily share code without having to upload it to npm.

Design decisions

  • As much as possible, we try to create a "normal" node environment in the runfiles for node binaries. This simplifies debugging (it's easier to create test cases without Bazel) and reduces the learning curve for node developers.

  • We use the --preserve-symlinks so that node doesn't get the realpath of the file and look up the node_modules outside of its runfiles.

  • The node_modules folder is created in the runfiles and is placed in the package directory that contains the node_binary target. This simplifies things because you can have the main for a binary be inside its node_modules. For example:

node_binary(
    name = 'webpack_bin',
    main = 'node_modules/webpack/bin/webpack.js',
    deps = ['//npm/webpack'],
)
  • The contents attr for npm_library is a list of strings that are turned into files instead of a list of labels because files have fewer character restrictions.

  • Compiled node modules are not currently supported.

Examples

See examples.

Setup

First you must install Bazel.

Linux

For Linux, you must add the following to your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
    name = "org_dropbox_rules_node",
    remote = "https://github.com/dropbox/rules_node.git",
    commit = "{HEAD}",
)

load("@org_dropbox_rules_node//node:defs.bzl", "node_repositories")

node_repositories()

This will pull in node v6.11.1 built for linux-x64. If you want to use another version of node, you should pass omit_nodejs=True and define another version of nodejs in your WORKSPACE file.

macOS

NOTE: These rules have only been tested on Linux.

For macOS, you must add the following to your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

git_repository(
    name = "org_dropbox_rules_node",
    remote = "https://github.com/dropbox/rules_node.git",
    commit = "{HEAD}",
)

load("@org_dropbox_rules_node//node:defs.bzl", "node_repositories", "NODEJS_BUILD_FILE_CONTENT")

node_repositories(omit_nodejs=True)

http_archive(
    name = "nodejs",
    url = "https://nodejs.org/dist/v6.11.1/node-v6.11.1-darwin-x64.tar.gz",
    strip_prefix = "node-v6.11.1-darwin-x64",
    sha256 = "a2b839259089ef26f20c17864ff5ce9cd1a67e841be3d129b38d288b45fe375b",
    build_file_content = NODEJS_BUILD_FILE_CONTENT,
)

This will pull in node v6.11.1 built for macOS.

Rules

node_binary

load("@org_dropbox_rules_node//node:defs.bzl", "node_binary")
node_binary(name, main, srcs, deps, data, extra_args, node, max_old_memory, expose_gc)

Creates a node binary, which is an executable Node program consisting of a collection of .js source files.

Node binaries are created using --preserve-symlinks.

One quirk of this rule is that if your script uses the pattern:

  if (require.main === module) {

to only execute something if the node script is the "main" script, you'll need to modify it to check BAZEL_NODE_MAIN_ID against the module id instead, like this:

  if (process.env['BAZEL_NODE_MAIN_ID'] === module.id || require.main === module) {

All node modules that this rule depends on, direct and transitive, end up flattened in {package-directory}/node_modules, where package-directory is the directory that the node_binary target is it. This means that, across all of your transitive dependencies tracked by Bazel, you can't depend on different versions of the same node module. (This does not apply to transitive dependencies of npm_library rules, which are not tracked by Bazel.)

The environmental variable NODE_PATH is set to {package-directory}/node_modules so that all the files that end up running can find all the included node modules.

One side-effect of that is that node libraries have access to all the transitive dependencies for the node binary that depends on them.

Examples:

node_binary(
    name = 'mybin',
    srcs = [
        'mybin.js',
    ],
    main = 'mybin.js',
    deps = [
        '//npm/loose-envify',
        '//npm/minimist',
        '//npm/mkdirp',
    ],
)
node_library(
    name = 'lib',
    srcs = ['lib.js'],
    deps = [
        '//npm/mkdirp',
    ],
)

node_binary(
    name = 'bin',
    srcs = ['bin.js'],
    deps = [
        ':lib',
    ],
)

Arguments

  • name: (Name; required) A unique name for this rule.

  • main: (Label; required) The name of the source file that is the main entry point of the application.

  • srcs: (List of labels; optional) The list of source files that are processed to create the target.

  • deps: (List of labels; optional) The list of other libraries included in the binary target.

  • data: (List of labels; optional) The list of files needed by this binary at runtime.

  • extra_args: (List of strings; optional) Command line arguments that bazel will pass to the target when it is executed either by the run command or as a test. These arguments are passed before the ones that are specified on the bazel run or bazel test command line.

  • node: (Label; defaults to @nodejs//:node) The node binary used to run the binary. Must be greater than 6.2.0.

  • max_old_memory: (Integer; optional) Node, by default, doesn't run its garbage collector on old space until a maximum old space size limit is reached. This overrides the default (of around 1.4gb) with the provided value in MB.

  • expose_gc: (Boolean; optional) Expose global.gc() in the node process to allow manual requests for garbage collection.

node_library

load("@org_dropbox_rules_node//node:defs.bzl", "node_library")
node_library(name, srcs, deps, data)

Groups node.js sources and deps together. Similar to py_library rules.

NOTE: This does not create an internal module that you can then require. For that, you need to use node_internal_module.

Arguments

  • name: (Name; required) A unique name for this rule.

  • srcs: (List of labels; optional) The list of source files that are processed to create the target.

  • deps: (List of labels; optional) The list of other libraries or node modules needed to be linked into the target library.

  • data: (List of labels; optional) The list of files needed by this library at runtime.

npm_library

load("@org_dropbox_rules_node//node:defs.bzl", "npm_library")
npm_library(name, npm_req, no_import_main_test, shrinkwrap, contents,
            npm_installer, npm_installer_args)

Defines an external npm module.

This rule should usually be generated using //node/tools/npm:gen_build_npm, like this:

bazel run @org_dropbox_rules_node//node/tools/npm:gen_build_npm -- [email protected] ~/myrepo/npm/my-module

The module and its dependencies are downloaded using npm_installer.

All of the module's dependencies are declared in the shrinkwrap but aren't known by Bazel. This is to work around Bazel's restrictions on circular dependencies, which are commonplace in the node ecosystem. By doing things this way, Bazel will know about your direct npm dependencies, but not your indirect dependencies.

One restriction that this rule places on it's output is that all the files output must either be in the module's directory or in '.bin'. E.g. if the module is named module-name, then this list of contents is legal:

contents = [
    'module-name/src/something.js',
    '.bin/some-binary',
]

But this list of contents is not:

contents = [
    'module-name/src/something.js',
    'another-modules/something-else.js',
]

This allows us to be reasonably sure that any two modules can be used together (except when '.bin' has conflicts, which should be rare).

Arguments

  • name: (Name; required) A unique name for this rule.

  • npm_req: (String; required) The npm string used to download this module. Must be in the form [email protected].

  • no_import_main_test: (Boolean; defaults to False) Don't test that the npm library can be required as if it has a main file.

    We test that all imports can be imported like: require('module'). For some imports that don't have a main js file to execute, this import will fail. For example, @types/ npm modules will fail. Set this to True to disable that check.

    NOTE: This rule will still generate a test to make sure that module version is correct.

  • shrinkwrap: (String; required) The shrinkwrap file that lists out all the node modules to install. Should usually be npm-shrinkwrap.json.

  • contents: (List of strings; required) All of the files included in the module.

    This should usually be autogenerated.

    contents is a string list instead of a label list to get around Bazel's restrictions on label names, which are violated by npm packages pretty often. Some restrictions still exist, like the restriction that file names cannot contain whitespace.

  • npm_installer: (Label; defaults to `@org_dropbox_rules_node//node/tools/npm:install) The binary to use to install the npm modules.

    The default npm_installer downloads them from the public npm registry, but ideally you should replace it with a binary that downloads from your private mirror.

  • npm_installer_args: (List of strings; optional) Extra arguments to pass to npm_installer.

node_internal_module

load("@org_dropbox_rules_node//node:defs.bzl", "node_internal_module")
node_internal_module(name, srcs, deps, data, require_name, package_json, main)

Create an internal node module that can be included in the deps for other rules and that can be required as require('module_name').

The module name used to require the module (i.e. require('module_name')) defaults to the name of the target.

Arguments

  • name: (Name; required) A unique name for this rule.

  • srcs: (List of labels; optional) The list of source files that are processed to create the target.

  • deps: (List of labels; optional) The list of other libraries included in the target.

  • data: (List of labels; optional) The list of files needed by this target at runtime.

  • require_name: (String; optional) The name for the internal node module. E.g. if require_name = "my-module", it should be used like require('my-module'). The default is the target name.

  • package_json: (String; optional) The package.json for the project. Cannot be specified along with main.

  • main: (String; optional) Defaults to the main field in the package.json or index.js if that doesn't exist. Cannot be specified along with package_json.

webpack_build

load("@org_dropbox_rules_node//node:defs.bzl", "webpack_build")
webpack_build(name, srcs, deps, data, outs, extra_args, env, config,
               webpack_target)

Build JS/CSS/etc with webpack.

It's recommend that you use the internal node module dbx-bazel-utils (@org_dropbox_rules_node//node/dbx-bazel-utils). If you use it like this:

var dbxBazelUtils = require('dbx-bazel-utils');
var env = dbxBazelUtils.initBazelEnv(__dirname);

Then it will set the working directory to the directory that contains webpack.config.js, which is usually what you want, and you should output to the directory in env.outputRoot.

If the webpack build is run outside of Bazel, then env.outputRoot will be __dirname.

Defaults to using [email protected]. You can specify your own webpack target with webpack_target.

Examples:

# webpack_build/BUILD
load('@org_dropbox_rules_node//node:defs.bzl', 'webpack_build')

webpack_build(
    name = 'webpack_build',
    srcs = glob([
        'src/*.js',
    ]),
    outs = ['bundle.js'],
    config = 'webpack.config.js',
    deps = [
        '@org_dropbox_rules_node//node/dbx-bazel-utils',
    ],
)
// webpack_build/webpack.config.js
var path = require('path');
var dbxBazelUtils = require('dbx-bazel-utils');
var env = dbxBazelUtils.initBazelEnv(__dirname);

module.exports = {
  entry: ['entry.ts'],
  output: {
    filename: 'bundle.js',
    path: env.outputRoot,
  },
}

Arguments

  • name: (Name; required) A unique name for this rule.

  • srcs: (List of labels; optional) The list of source files that are processed to create the target.

  • deps: (List of labels; optional) The list of other libraries included in the target.

  • data: (List of labels; optional) The list of files needed by this target at runtime.

  • outs: (List of labels; required) The list of files output by this rule.

  • extra_args: (List of strings; optional) The list of additional args for this build.

  • env: (Dict of strings; optional) Additional environmental variables to set for the build.

  • config: (Label; required) The webpack.config.js file.

  • webpack_target: (Label; defaults to @org_dropbox_rules_node//npm/webpack) The webpack target to use.

node_build

load("@org_dropbox_rules_node//node:defs.bzl", "node_build")
node_build(name, outs, data, builder, extra_args, env, optimize_flag)

Build JS/CSS/etc with a node binary.

This is a low-level rule, and is only recommended for completely custom node builds. If you're using webpack, you should use the webpack_build rule. If you're using another standard JS build system (rollup, gulp, grunt, ...), you should write a macro that follows the conventions of webpack_build.

This rule does not have a srcs attribute because it expects all the srcs needed for the build to be included in the builder binary.

The environmental variable BAZEL_OUTPUT_DIR is set for all builds. The builder binary should output to that directory.

Arguments

  • name: (Name; required) A unique name for this rule.

  • data: (List of labels; optional) The list of files needed by this target at runtime.

  • outs: (List of labels; required) The list of files output by this rule.

  • builder: (Label; required) The node binary used to build.

  • env: (Dict of strings; optional) Additional environmental variables to set for the build.

  • extra_args: (List of strings; optional) The list of additional args for this build.

  • optimize_flag: (String; optional) The flag to pass to the build when it's run in "opt" mode. If this flag is not defined, then no flag is passed in "opt" mode.

mocha_test

load("@org_dropbox_rules_node//node:defs.bzl", "mocha_test")
mocha_test(name, srcs, deps, extra_args, mocha_target, chai_target, **kwargs)

Defines a node test that uses mocha. Takes the same args as node_binary, except that you can't pass a main arg, because mocha is run as the main js file.

Includes dependencies on [email protected] and [email protected] by default. You can change those dependencies by setting mocha_target and chai_target.

Arguments

Takes the same arguments as node_binary, except for the following:

  • mocha_target: The target to use for including 'mocha'.

  • chai_target: The target to use for including 'chai'.

node_test

load("@org_dropbox_rules_node//node:defs.bzl", "node_test")
node_test(**kwargs)

Defines a basic node test. Succeeds if the program has a return code of 0, otherwise it fails.

Arguments

Has the same arguments as node_binary.

rules_node's People

Contributors

jboning avatar miikka avatar peterlebrun avatar samertm 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rules_node's Issues

can you discuss Webpack a little more?

Hi there,
I was curious about this note in the README about webpack_build:

Making the experience of using webpack better within Dropbox was one of the reasons we wrote these rules.

Can you elaborate a little further on how it's made the experience of using Webpack better? Is it faster? Shorter restarts?

Thanks,
Kevin

Simple express example not working

I am trying to put together a simple express example to try these out (since I've been able to get further with them than bazelbuild/rules_nodejs), and I'm running into an issue.

To reproduce (on top of standard WORKSPACE @ 4fe6494):

# Set up express dependency.
# see: https://github.com/dropbox/rules_node/issues/3
bazel run @org_dropbox_rules_node//node/tools/npm:gen_build_npm -- [email protected] $PWD/

I then append (adding node_binary to the load()):

node_binary(
    name = 'binary',
    srcs = ['index.js'],
    main = 'index.js',
    deps = [
        ':express',
    ],
)

However, when I bazel run :binary I'm getting:

$ bazel run :binary
INFO: Analysed target //:binary (0 packages loaded).
INFO: Found 1 target...
ERROR: /home/mattmoor/trying-node/BUILD:334:1: Creating runfiles tree bazel-out/local-opt/bin/binary.runfiles failed (Exit 1)
_bin/build-runfiles (args bazel-out/local-opt/bin/binary.runfiles_manifest bazel-out/local-opt/bin/binary.runfiles): paths must not be absolute: line 1: '/node_modules/express/History.md /home/mattmoor/.cache/bazel/_bazel_mattmoor/e6c1f9a612e03cb822c6e33f6e63f45c/execroot/__main__/bazel-out/local-opt/bin/node_modules/express/History.md'

Target //:binary failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.647s, Critical Path: 1.38s
FAILED: Build did NOT complete successfully
ERROR: Build failed. Not running target

The contents of index.js don't even matter. Am I holding it wrong? Any workarounds?

Bazel version info:

$ bazel version
Build label: 0.7.0
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Oct 18 14:27:19 2017 (1508336839)
Build timestamp: 1508336839
Build timestamp as int: 1508336839

Webpak Build Error

File "c:\users\rwatts\appdata\local\temp\Bazel.runfiles_s8dqke\runfiles\org_dropbox_rules_node\node\tools\npm\runfiles.py", line 18, in _get_runfiles_dir
    raise RunfilesError('Must be run in Bazel environment')
node.tools.npm.runfiles.RunfilesError: Must be run in Bazel environment
Target //:bundle failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.455s, Critical Path: 0.84s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

Problem using with node 8.11.4

I've run into an issue attempting to get this working with node 8.11.4. You can see a reproduction of this at https://github.com/pward123/bazel-node-reproduction

Running with the default node version succeeds, but running with 8.11.4 fails with the following:

...

[8 / 9] installing node modules from npm/lodash/npm-shrinkwrap.json; 0s processwrapper-sandbox
ERROR: /usr/src/app/npm/lodash/BUILD:7:1: output 'npm/lodash/node_modules/lodash/LICENSE' was not created
ERROR: /usr/src/app/npm/lodash/BUILD:7:1: output 'npm/lodash/node_modules/lodash/README.md' was not created
ERROR: /usr/src/app/npm/lodash/BUILD:7:1: output 'npm/lodash/node_modules/lodash/_DataView.js' was not created
ERROR: /usr/src/app/npm/lodash/BUILD:7:1: output 'npm/lodash/node_modules/lodash/_Hash.js' was not created
ERROR: /usr/src/app/npm/lodash/BUILD:7:1: output 'npm/lodash/node_modules/lodash/_LazyWrapper.js' was not created
ERROR: /usr/src/app/npm/lodash/BUILD:7:1: output 'npm/lodash/node_modules/lodash/_ListCache.js' was not created
E

...

Rules assume /usr/bin/python is Python 2

Last night, I decided to build livegrep which uses rules_node. Now I could be wrong, but it looks like these rules depend on /usr/bin/python being Python 2. I tried a Python 2 virtual environment, but got the same dictionary item concatenation error. Then when I temporarily linked /usr/bin/python to /usr/bin/python2, the build succeed.

ERROR: /home/jeff/.cache/bazel/_bazel_jeff/bb4d08f3ff80487a42cb41ef63df32dd/external/org_dropbox_rules_node/npm/webpack/BUILD:7:1: installing node modules from external/org_dropbox_rules_node/npm/webpack/npm-shrinkwrap.json failed (Exit 1)
Traceback (most recent call last):
  File "/home/jeff/.cache/bazel/_bazel_jeff/bb4d08f3ff80487a42cb41ef63df32dd/sandbox/processwrapper-sandbox/1395/execroot/com_github_livegrep_livegrep/bazel-out/host/bin/external/org_dropbox_rules_node/node/tools/npm/install.runfiles/org_dropbox_rules_node/node/tools/npm/install.py", line 49, in <module>
    main()
  File "/home/jeff/.cache/bazel/_bazel_jeff/bb4d08f3ff80487a42cb41ef63df32dd/sandbox/processwrapper-sandbox/1395/execroot/com_github_livegrep_livegrep/bazel-out/host/bin/external/org_dropbox_rules_node/node/tools/npm/install.runfiles/org_dropbox_rules_node/node/tools/npm/install.py", line 45, in main
    npm_install(args.shrinkwrap, args.output)
  File "/home/jeff/.cache/bazel/_bazel_jeff/bb4d08f3ff80487a42cb41ef63df32dd/sandbox/processwrapper-sandbox/1395/execroot/com_github_livegrep_livegrep/bazel-out/host/bin/external/org_dropbox_rules_node/node/tools/npm/install.runfiles/org_dropbox_rules_node/node/tools/npm/install.py", line 27, in npm_install
    run_npm(['install'], env=env, cwd=output)
  File "/home/jeff/.cache/bazel/_bazel_jeff/bb4d08f3ff80487a42cb41ef63df32dd/sandbox/processwrapper-sandbox/1395/execroot/com_github_livegrep_livegrep/bazel-out/host/bin/external/org_dropbox_rules_node/node/tools/npm/install.runfiles/org_dropbox_rules_node/node/tools/npm/utils.py", line 84, in run_npm
    full_env = dict(full_env.items() + env.items())
TypeError: unsupported operand type(s) for +: 'dict_items' and 'dict_items'
INFO: Elapsed time: 376.399s, Critical Path: 28.67s
INFO: 1395 processes: 1395 processwrapper-sandbox.
FAILED: Build did NOT complete successfully

Q: failing to build/use npm_library

Hi,

While trying to add react as npm_library via gen_build_npm all looked ok until I tried to require it in webpack_build. Then I got errors for missing modules:

root@492043872cb0:/usr/src/app# bazel build //examples/webpack_build:webpack_build
INFO: Analysed target //examples/webpack_build:webpack_build (1 packages loaded).
INFO: Found 1 target...
ERROR: /usr/src/app/examples/webpack_build/BUILD:5:1: building webpack_build with node failed (Exit 2)
Hash: 941dea5966bf4b5f728e
Version: webpack 3.4.1
Time: 324ms
    Asset     Size  Chunks             Chunk Names
bundle.js  96.1 kB       0  [emitted]  main
  [12] multi entry.ts 28 bytes {0} [built]
  [13] /usr/src/app/examples/webpack_build/src/entry.ts 156 bytes {0} [built]
  [14] /usr/src/app/examples/webpack_build/src/stuff.ts 31 bytes {0} [built]
  [15] /usr/src/app/examples/internal_module/internal_module.js 32 bytes {0} [built]
    + 26 hidden modules

ERROR in /root/.cache/bazel/_bazel_root/a14564dce24fc232216f1aef117728d1/execroot/org_dropbox_rules_node/bazel-out/host/bin/examples/npm/react/node_modules/react/lib/React.js
Module not found: Error: Can't resolve 'object-assign' in '/root/.cache/bazel/_bazel_root/a14564dce24fc232216f1aef117728d1/execroot/org_dropbox_rules_node/bazel-out/host/bin/examples/npm/react/node_modules/react/lib'
 @ /root/.cache/bazel/_bazel_root/a14564dce24fc232216f1aef117728d1/execroot/org_dropbox_rules_node/bazel-out/host/bin/examples/npm/react/node_modules/react/lib/React.js 11:14-38
 @ /root/.cache/bazel/_bazel_root/a14564dce24fc232216f1aef117728d1/execroot/org_dropbox_rules_node/bazel-out/host/bin/examples/npm/react/node_modules/react/react.js
 @ /usr/src/app/examples/webpack_build/src/entry.ts
 @ multi entry.ts

ERROR in /root/.cache/bazel/_bazel_root/a14564dce24fc232216f1aef117728d1/execroot/org_dropbox_rules_node/bazel-out/host/bin/examples/npm/react/node_modules/react/lib/ReactBaseClasses.js
Module not found: Error: Can't resolve 'object-assign' in '/root/.cache/bazel/_bazel_root/a14564dce24fc232216f1aef117728d1/execroot/org_dropbox_rules_node/bazel-out/host/bin/examples/npm/react/node_modules/react/lib'
 @ /root/.cache/bazel/_bazel_root/a14564dce24fc232216f1aef117728d1/execroot/org_dropbox_rules_node/bazel-out/host/bin/examples/npm/react/node_modules/react/lib/ReactBaseClasses.js 12:14-38
 @ /root/.cache/bazel/_bazel_root/a14564dce24fc232216f1aef117728d1/execroot/org_dropbox_rules_node/bazel-out/host/bin/examples/npm/react/node_modules/react/lib/React.js
 @ /root/.cache/bazel/_bazel_root/a14564dce24fc232216f1aef117728d1/execroot/org_dropbox_rules_node/bazel-out/host/bin/examples/npm/react/node_modules/react/react.js
 @ /usr/src/app/examples/webpack_build/src/entry.ts
 @ multi entry.ts
...

any ideas if I'm doing smth wrong or maybe there is a fix/workaround for this?

Thanks alot in advance!

Discuss bazelbuild/rules_node

Hi @samertm , I'm on the Angular team and also have written nodejs rules. Currently they are part of the TypeScript rules but I would like to make a canonical rule under bazelbuild as you suggest in your README.

I started a discussion with the maintainer of the pubref version here: pubref/rules_node#19 (comment)

We can discuss on this issue, or you can just treat it as a ping and we can continue discussion on that issue.

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.