Files
zmk/docs/src/docusaurus-tree-sitter-plugin/index.js
Peter Johanson feda96eb40 feat(studio): Initial RPC infrastructure and subsystems.
* UART and BLE/GATT transports for a protobuf encoded RPC
  request/response protocol.
* Custom framing protocol is used to frame a give message.
* Requests/responses are divided into major "subsystems" which
  handle requests and create response messages.
* Notification support, including mapping local events to RPC
  notifications by a given subsystem.
* Meta responses for "no response" and "unlock needed".
* Initial basic lock state support in a new core section, and allow specifying
  if a given RPC callback requires unlocked state or not.
* Add behavior subsystem with full metadata support and examples of
  using callback to serialize a repeated field without extra stack space needed.

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
2024-08-15 11:45:18 -06:00

36 lines
765 B
JavaScript

/*
* Copyright (c) 2021 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
module.exports = function () {
return {
name: "tree-sitter",
configureWebpack(config, isServer) {
let rules = [];
// Tree-sitter is only used for client-side code.
// Don't try to load it on the server.
if (isServer) {
rules.push({
test: /web-tree-sitter/,
loader: "null-loader",
});
}
return {
// web-tree-sitter tries to import "fs", which can be ignored.
// https://github.com/tree-sitter/tree-sitter/issues/466
resolve: {
fallback: {
fs: false,
path: false,
},
},
module: { rules },
};
},
};
};