Giter Site home page Giter Site logo

roots / bud Goto Github PK

View Code? Open in Web Editor NEW
318.0 9.0 38.0 227.55 MB

High-performance build system that supports SWC, esbuild, and Babel

Home Page: https://bud.js.org/

License: MIT License

JavaScript 7.76% TypeScript 78.66% HTML 0.01% Shell 0.05% Dockerfile 0.08% Ruby 0.34% Objective-C 0.87% Rich Text Format 0.03% CSS 0.76% SCSS 0.02% Blade 0.01% Vue 0.11% Handlebars 0.64% MDX 10.68%
webpack react sass postcss build-tool hmr eslint stylelint esbuild typescript

bud's Introduction

bud.js

MIT License npm Follow Roots

bud.js

Configurable, extensible build tools for modern single and multi-page web applications


Goals

bud.js wants to be:

  • Reliable, yielding consistent and predictable behaviors regardless of specified options.
  • Fast, leveraging parallel processing, smart caching and an asyncronous events based API to keep build times minimal.
  • Extensible, with a fully featured plugin system to support an ecosystem of packaged modules.
  • Simple, to get started and straight forward to maintain.

Features

  • Zero config by default. Check out this codesandbox template with react, postcss modules and no config.
  • Modular by design. Use only what you need.
  • Multi-compiler support.
  • Heckin’ fast.
  • Lux developer tooling and semi-automated dependency management.
  • Support for configuration files authored with TypeScript, JSON, YML, CJS and ESM.
  • Support for CDNs like skypack and unpkg.
  • Customizable and extensible.

Requirements

  • Node 16+
  • yarn 1.22 or higher
  • npm 8.3 or higher
  • Windows users must run bud.js under the Windows Subsystem for Linux.

Getting started

Quickly scaffold a new project with create-bud-app:

npx create-bud-app

If you want to add bud.js to an existing project or want to further customize the scaffolded app check out the Getting Started guide.

There are many example implementations available.

Modules

Presets

β„Ή Presets are a collection of extensions which are commonly used together. There are currently three presets: our general preset, a WordPress specific preset, and the preset used in the roots/sage theme.

Package name Usage Stable Release Preview Release
@roots/bud-preset-recommend πŸ“š Docs npm npm
@roots/bud-preset-wordpress πŸ“š Docs npm npm
@roots/sage πŸ“š Docs npm npm

Extensions

Language support & module preprocessors

β„Ή These extensions provide support for languages and syntaxes which are not understood by the browser and require compilation.

Name README Stable Release Preview Release
@roots/bud-babel πŸ“š Docs npm npm
@roots/bud-esbuild πŸ“š Docs npm npm
@roots/bud-mdx πŸ“š README npm npm
@roots/bud-postcss πŸ“š Docs npm npm
@roots/bud-sass πŸ“š Docs npm npm
@roots/bud-swc πŸ“š Docs npm npm
@roots/bud-typescript πŸ“š Docs npm npm

Optimization

β„Ή These extensions optimize compiled code and static assets to help ensure a high quality user experience in your app. They are typically only run in production mode.

Name README Stable Release Preview Release
@roots/bud-compress πŸ“š README npm npm
@roots/bud-criticalcss πŸ“š Docs npm npm
@roots/bud-imagemin πŸ“š Docs npm npm
@roots/bud-purgecss πŸ“š Docs npm npm

Features and framework support

β„Ή These extensions provide support for popular application frameworks like React & Vue. Make sure to install a compatible compiler or preprocessor.

Name README Stable Release Preview Release
@roots/bud-emotion πŸ“š Docs npm npm
@roots/bud-react πŸ“š Docs npm npm
@roots/bud-solid πŸ“š Docs npm npm
@roots/bud-tailwindcss πŸ“š Docs npm npm
@roots/bud-vue πŸ“š Docs npm npm

Code quality

β„Ή These extensions ensure source code conforms to a specified style. Linting configuration is expected to be provided by the user, but a base eslint config is available: @roots/eslint-config.

Name README Stable Release Preview Release
@roots/bud-eslint πŸ“š Docs npm npm
@roots/bud-prettier πŸ“š README npm npm
@roots/bud-stylelint πŸ“š Docs npm npm

WordPress specific

β„Ή All of these extensions are included in @roots/bud-preset-wordpress.

Name README Stable Release Preview Release
@roots/bud-tailwindcss-theme-json πŸ“š README npm npm
@roots/bud-wordpress-dependencies πŸ“š README npm npm
@roots/bud-wordpress-externals πŸ“š README npm npm
@roots/bud-wordpress-theme-json πŸ“š README npm npm

Community extensions

β„Ή The following extensions are maintained by the community. Please refrain from making issues in this repo regarding these extensions.

Name README Stable Release
bud-embedded πŸ“š README npm
bud-localtunnel πŸ“š README npm
bud-wp-editor-query πŸ“š README npm

Have you produced a bud.js extension and want to share it here? Please, create an issue sharing information about your project.

For more information on authoring your own extension consult the documentation and the source code of the extensions in this repository.

Core modules

β„Ή @roots/bud is actually made up of a number of packages. You only need to install @roots/bud to use bud.js.

Package name Usage Stable Release Preview Release
@roots/bud πŸ“š Docs npm npm
@roots/bud-api πŸ“š README npm npm
@roots/bud-build πŸ“š README npm npm
@roots/bud-cache πŸ“š README npm npm
@roots/bud-client πŸ“š README npm npm
@roots/bud-compiler πŸ“š README npm npm
@roots/bud-dashboard πŸ“š README npm npm
@roots/bud-entrypoints πŸ“š README npm npm
@roots/bud-extensions πŸ“š README npm npm
@roots/bud-framework πŸ“š README npm npm
@roots/bud-hooks πŸ“š README npm npm
@roots/bud-minify πŸ“š README npm npm
@roots/bud-server πŸ“š README npm npm
@roots/bud-support πŸ“š README npm npm

Support modules

β„Ή These packages are not specific to bud.js but are used by the framework. They could be used in other projects outside of the context of bud.js.

Name README Stable Release Preview Release
@roots/blade-loader πŸ“š README npm npm
@roots/browserslist-config πŸ“š README npm npm
@roots/container πŸ“š README npm npm
@roots/critical-css-webpack-plugin πŸ“š README npm npm
@roots/dependencies πŸ“š README npm npm
@roots/entrypoints-webpack-plugin πŸ“š README npm npm
@roots/eslint-config πŸ“š README npm npm
@roots/filesystem πŸ“š README npm npm
@roots/wordpress-dependencies-webpack-plugin πŸ“š README npm npm
@roots/wordpress-externals-webpack-plugin πŸ“š README npm npm
@roots/wordpress-hmr πŸ“š README npm npm
@roots/wordpress-theme-json-webpack-plugin πŸ“š README npm npm
@roots/wordpress-transforms πŸ“š README npm npm

Contributing

Contributions are welcome from everyone.

We have contribution guidelines to help you get started.

License

bud.js is licensed under MIT.

Community

Keep track of development and community news.

Sponsors

Bud is an open source project and completely free to use.

However, the amount of effort needed to maintain and develop new features and projects within the Roots ecosystem is not sustainable without proper financial backing. If you have the capability, please consider sponsoring Roots.

KM Digital Carrot WordPress.com Worksite Safety Copia Digital Freave

bud's People

Contributors

alexdanylyschyn avatar alwaysblank avatar cawa-93 avatar chrillep avatar clayrisser avatar dependabot[bot] avatar dsturm avatar hansanghyeon avatar joshuafredrickson avatar kellymears avatar log1x avatar nlemoine avatar qwp6t avatar renovate-bot avatar renovate[bot] avatar retlehs avatar robrecord avatar speakincode avatar studiorectangle avatar swalkinshaw avatar talss89 avatar unlocdavid avatar xeader 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  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

bud's Issues

Error: TypeError: Cannot read properties of undefined (reading 'hasPeerDependency')

Description

Grabbed the newest Sage 10 build using Bud for packaging. I wanted to add react and typescript support but it's throwing errors

Steps to reproduce

  1. Download the latest Sage theme
  2. yarn install
  3. yarn add @roots/bud-react --dev
  4. yarn bud init

Expected behavior: [What you expect to happen]

I expected yarn to install all the peer dependencies for react

Actual behavior: [What actually happens]

It stops with this error:

Error: TypeError: Cannot read properties of undefined (reading 'hasPeerDependency')
error Command failed with exit code 1.

Reproduces how often: [What percentage of the time does it reproduce?]

Every time

Versions

Latest Sage build from Nov 22nd

Additional information

I'm in the process of rebuilding my Sage 10 theme with laravel mix to the newest with Bud

@roots/bud-imagemin: add webp optimization options

Summary

  • @roots/bud-imagemin should allow for converting non webp assets to webp.
  • @roots/bud-imagemin should allow for optimizing webp assets.

Motivation

webp is now supported by all major browsers. the framework should support it as well.

Additional context

Installing @roots/bud-sass throws an error

Description

When trying to install bud-sass extension in a Sage 10 theme, it throws an error (actually two different errors depending on the scenario). Unable to continue.

Steps to reproduce

  1. composer create-project roots/sage sage_10 dev-master && cd sage_10 (install Sage 10)
  2. yarn add @roots/bud-sass --dev (install bud-sass extension)
  3. yarn bud init (install its dependencies, as per docs)
  4. yarn build

Expected behavior: [What you expect to happen]
Build should finish with no errors.

Actual behavior: [What actually happens]
Throws an error:

[sage_10.1] [bud.extensions] β€Ί βœ– @roots/bud-postcss TypeError: value.bind is not a function
    at [secure]/node_modules/@roots/bud-framework/lib/cjs/Framework/bindMethod.js:27:28
    at Array.map (<anonymous>)
    at Bud.bindMethod ([secure]/node_modules/@roots/bud-framework/lib/cjs/Framework/bindMethod.js:26:32)
    at Controller.<anonymous> ([secure]/node_modules/@roots/bud-extensions/lib/cjs/Controller/controller.service.js:183:22)
    at Generator.next (<anonymous>)
    at fulfilled ([secure]/node_modules/tslib/tslib.js:114:62)
[sage_10.1] [bud.extensions] β€Ί βœ” register called @roots/bud-babel
    Error: TypeError: value.bind is not a function
error Command failed with exit code 1.

Reproduces how often: [What percentage of the time does it reproduce?]
Every time.

Additional information

I have tried a different path at step 3, as suggested here.
And so:
3. yarn bud build --install
..throws this error:

[sage_10.1] [bud.extensions] β€Ί βœ”  @roots/bud-postcss resolved
    Error: Cannot find module '/Users/bzx/Projects/Cyklobazar/bedrock/web/app/themes/sage_10.1/node_modules/@roots/bud-sass/lib/cjs/index.js'
    Code: MODULE_NOT_FOUND

As suggested in the comment, I've tried running yarn install afterwards, which goes fine, but a subsequent yarn build throws the same error as described in Actual Behaviour section.

Bud binary doesn’t seem to work

Description

Using the bud binary doesn’t seem to work at all.

Steps to reproduce

  1. yarn add @roots/bud --dev
  2. yarn bud {anything} or ./node_modules/.bin/bud

Expected behavior: Should at least show an error message.

Actual behavior: The following error is thrown.

ο»Ώο»Ώnode:internal/modules/cjs/loader:922
  throw err;
  ^

Error: Cannot find module '../@roots/bud-cli/lib/bud'
Require stack:
- /Users/knowler/code/web-project/node_modules/@roots/bud-cli/bin/bud.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:15)
    at Function.Module._load (node:internal/modules/cjs/loader:763:27)
    at Module.require (node:internal/modules/cjs/loader:991:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/knowler/code/web-project/node_modules/@roots/bud-cli/bin/bud.js:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)
    at Module.load (node:internal/modules/cjs/loader:967:32)
    at Function.Module._load (node:internal/modules/cjs/loader:807:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/knowler/code/web-project/node_modules/@roots/bud-cli/bin/bud.js'
  ]
}

Reproduces how often: Every time

Versions

You can get this information from referencing CHANGELOG.md. Also, please include the OS and what version of the OS you're running.

macOS 11.0.1
Node 15.2.1
Bud 2.0.2

Additional information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Yarn@Berry support

Description

[Description of the issue]
Using bud in a project that uses Yarn@Berry don't work. I received error:

(node:23777) [ERR_REQUIRE_ESM] Error Plugin: @roots/bud [ERR_REQUIRE_ESM]: Must use import to load ES Module: /{FOLDER_ROOT}/node_modules/@roots/bud/node_modules/globby/index.js
require() of ES modules is not supported.
require() of /{FOLDER_ROOT}/node_modules/@roots/bud/node_modules/globby/index.js from /{FOLDER_ROOT}/node_modules/@oclif/config/lib/plugin.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /{FOLDER_ROOT}/node_modules/@roots/bud/node_modules/globby/package.json.

I found out, that Yarn@Berry installs @roots/bud dependencies in it's folder and so there is a globby there. When I just use normal Yarn everything works.

Steps to reproduce

  1. Init simple project with npm init
  2. Change yarn: yarn set version berry
  3. Install bud: yarn add @roots/bud @roots/bud-cli --dev
  4. run yarn bud init

Expected behavior:
Should not crash

Actual behavior:
Crashes bud

Reproduces how often: [What percentage of the time does it reproduce?]
everytime

Versions

@roots/bud: ^4.7.0-10
@roots/bud-cli: ^4.7.0-10

macOS 11.3.1
Yarn: 1.22.11
Yarn Berry: 3.0.1
Node: 14.17.5

html webpack plugin incompatible with html loader

Description

When using bud.template(), the html-loader should be removed to allow html-webpack-plugin to use its own fallback loader and template system.

Steps to reproduce

  1. Use .template() to transform an html file via bud
  2. Attempt to use its internal template <%= 'hello world' %>

Expected behavior: See hello world in output html

Actual behavior: See <%= 'hello world' %> in output html

Reproduces how often: πŸ’―

Versions

4.5.0 Ubuntu latest

Additional information

HtmlWebpackPlugin will only use its own custom loader when no other html loaders are present.

See: https://github.com/jantimon/html-webpack-plugin/blob/main/docs/template-option.md

EJS export: @roots/bud-framework

Summary

#25 adds EJS exports to @roots/bud. We should support EJS exports in @roots/bud-framework, as well.

Motivation

@roots/bud-framework serves as a contract for alternative framework implementations. For Typescript implementations this doesn't really matter, but if someone wants to implement the @roots/bud-framework contract in plain JS then they should have first-class support, which includes module import/export syntax.

Add tests: cover @roots/container

Summary

Jest tests for @roots/bud-container

Motivation

Feeling confident that the most foundational package in the repository behaves predictably and expectedly.

Additional context

Eventually, we want great coverage for the entire repository. This is the most important package to start.

bud.assets should add glob matches to server.config.watch.files

Summary

When copying files with bud.assets it makes sense to add matches to the list of files which trigger a full browser reload.

Motivation

This is an improvement in developer experience -- adding/removing/modifying a static asset on disk will no longer require manually reloading the browser to the see the change reflected.

README missing line break before Sponsors

Description

README is missing a line break before Sponsors section.

Steps to reproduce

  1. Look at README

Expected behavior: Sponsors has a line break before it

Actual behavior: Sponsors does not have a line break before it

Reproduces how often: 100%

Styles not compiling by default

Description

Styles not compiling by default.

Steps to reproduce

  1. Clone Sage 10 repo
  2. Run the following commands: yarn && composer Install && yarn dev && yarn build
  3. Check the public folder for CSS files.

Expected behavior:

The editor.css and app.css should be compiled into the "public" folder but are not by default. However, no error is displayed.

Reproduces how often:
Every time.

Additional information

  • If I remove the @apply's from the global.css file and add some standard CSS, it will compile as expected.
  • If I try to change the file the files to SCSS, I get the following error:
    When linting something other than CSS, you should install an appropriate syntax, e.g. "postcss-scss", and use the "customSyntax" option.
    I've tried "yarn add postcss-scss --dev" and tweaking the stylelint config file but not having any luck.

Running build with `npm`: ValidationError: Invalid configuration object.

Description

[Description of the issue]

Steps to reproduce

  1. [First step]
  2. [Second step]
  3. [and so on...]

Expected behavior: [What you expect to happen]

Actual behavior: [What actually happens]

Reproduces how often: [What percentage of the time does it reproduce?]

Versions

You can get this information from referencing CHANGELOG.md. Also, please include the OS and what version of the OS you're running.

Additional information

Screenshot 2021-11-22 141721

Any additional information, configuration or data that might be necessary to reproduce the issue.

ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. β”‚
β”‚ - configuration[0].resolve.modules[2] should be a non-empty string. β”‚
β”‚ -> Folder name or directory path where to find modules.

ESBuildPlugin deprecation notice

Description

When running a build using the @roots/bud-esbuild extension, the following warning appears:

[esbuild-loader] ESBuildPlugin is no longer required for usage and will be removed in the next major release. Please refer to the docs and release notes for more info.

Expected behavior: No warnings.

Actual behavior: Warnings.

Reproduces how often: 100%

Versions

  • all packages: 3.0.112-alpha.0

Additional information

From package.lock:

esbuild-loader@^2.9.1:
  version "2.11.0"
  resolved "https://registry.yarnpkg.com/esbuild-loader/-/esbuild-loader-2.11.0.tgz#65efc9c8ab14f2da06b9d165396f9520b4aeac96"
  integrity sha512-yFzrpIvhHRtV1Z8V1VtW6xm0dmEHlBheJjhx+EJPTcSKBhVMeIKC2FVyZ+N1ZgSBZEKgky9vtD4q455HgnT/3g==
  dependencies:
    esbuild "^0.10.2"
    joycon "^3.0.1"
    json5 "^2.2.0"
    loader-utils "^2.0.0"
    type-fest "^1.0.1"
    webpack-sources "^2.2.0"

esbuild@^0.10.2:
  version "0.10.2"
  resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.10.2.tgz#caa65a8f3096d547d89159918039df6c5c6c90be"
  integrity sha512-/5vsZD7wTJJHC3yNXLUjXNvUDwqwNoIMvFvLd9tcDQ9el5l13pspYm3yufavjIeYvNtAbo+6N/6uoWx9dGA6ug==

Housekeeping: Exploring build tools

Summary

Right now we're using yarn@latest as our monorepo solution. This hasn't been a perfectly delightful experience. Most recently, we've had significant issues resolving a bizarre bug in CI when using github actions and have temporarily fallen back on circleci. The issue is almost assuredly related to yarn workspaces foreach.

This isn't the only option.

This issue is dedicated to exploring how we want to handle monorepo workflows, and the tools available to do it:

  • tsc (with project refs)
  • yarn (currently using)
  • lerna
  • bolt
  • dogfooding
  • nx

There are even more (rush, buck, etc.) but we can't evaluate all of them anyway. Still, if you think we should explore something that isn't listed, feel free to chime in with the case for it.

Refs

Deprecate internal usage of @roots/bud-typings

Summary

@roots/bud-typings helped get this project off the ground but it is no longer wanted/needed. Instead, it should export aggregate type definitions from the rest of the packages for consumption by third parties, etc.

Motivation

  • Encourages decoupling of packages
  • Related: makes @roots/bud-framework more fault tolerant and easier to extend / provide alternate implementations for.
  • Lessens developer friction (switching contexts to @roots/bud-typings when working on another package is bothersome).

Notes

  • @roots/bud-compiler needed refactoring for Webpack 5. This was handled alongside that work (#43)

Todo

  • @roots/bud-api
  • @roots/bud-build (7208d51)
  • @roots/bud-cli
  • @roots/bud-compiler (#43)
  • @roots/bud-dashboard (#47)
  • @roots/bud-extensions
  • @roots/bud-framework
  • @roots/bud-hooks
  • @roots/bud-server

Feature: add escape for markdown parsing

Summary

Super low priority.

It is not currently possible to escape markdown parsing for docs pages.

The only issue this causes right now is trying to describe the markdown parsing in the dev docs.

Motivation

It would be nice to be able to escape markdown parsing.

Maybe something like:

{no-parse}
[Some doc page](docs:config/doc-page)
{end-no-parse}

But, I haven't given it much thought.

Additional context

Current rules:

  • Docs links:
[Some doc page](docs:config/doc-page) => 
[Some doc page](https://github.com/roots/bud/tree/stable/docs/config/doc-page)
  • Pkg links:
[Some repo path](url:packages/@roots/bud/src) => 
[Some repo path](https://github.com/roots/bud/tree/stable/packages/@roots/bud/src)
  • surrounding a repo pkg name with backticks becomes a link to the package root
`@roots/bud` => [@roots/bud](https://github.com/roots/bud/tree/stable/packages/@roots/bud)
  • [badge](npm:@roots/bud) becomes a badge
  • @user/repo becomes a link to whatever github repo

All of this is in https://github.com/roots/bud/tree/stable/dev/docs/gen/remark.ts. Some of it is powered by remark; the more specific stuff is just regex parsing.

feature: support webp as asset/resource

Summary

webp assets should be handled as asset/resource using the existing image rule.

Motivation

webp is now supported by all major browsers. it should be supported by the framework.

Additional context

converting non webp to webp should be handled by @roots/bud-imagemin. the base framework should just acknowledge webp is a resource asset.

Related @roots/bud-imagemin issue: #142

Feature: Package @roots/bud-cli with vercel/pkg

Summary

It would be ideal to ship @roots/bud with @roots/bud-cli as an included bin script. vercel/pkg allows for packaging the cli tools up as a single file which we can drop into @roots/bud/bin.

Motivation

  • Users will no longer need to add two packages to their package manifest.

Additional details

  • We will also need to modify all md docs that specify installing @roots/bud-cli as a requirement.

CSS lint errors for SCSS stylesheet files (e.g. `Unknown word`; ...)

Description

CSS lint errors occur with SCSS styles, e.g.
βœ– Unknown word CssSyntaxError
for valid SCSS syntax for variables, single-line comments, etc.

Steps to reproduce

  1. Initialize new Sage 10 theme from dev-master for bud.
  2. Install @roots/bud-sass as development dependency and it to bud.use
    (instructions; minimal example in this repository)
  3. Use SCSS files instead of CSS files
    (e.g. rename the existing app.css and editor.css to app.scss and editor.scss).
  4. Add some SCSS specific syntax that would be invalid in CSS,
    e.g. a SCSS variable ($) or a single line comment (//).
  5. Run the build. Notice the CSS lint errors that normally also prevent the build.

Expected behavior:
bud should configure (webpack) to use a different linter for SCSS files or
let the existing linter correctly handle SCSS files as SCSS files and not CSS files.

Actual behavior:
Linter is configured to treat SCSS files as CSS files, causing lint errors.

Reproduces how often:
Every time.

Versions

``
Node 16.9.1
WSL `2`
Last Sage 10 changelog entry: `Replace Laravel Mix with Bud (#2643)`

CI: MacOS smoketest failing

Description

MacOS builds are failing in GH Actions test workflow.

Steps to reproduce

  1. Trigger test workflow on next

Expected behavior:

All builds pass.

Actual behavior:

MacOS build fails

Reproduces how often:

100%

Versions

v2.0.3-next.0

Additional information

Ref: #22

Unable to generate markdown files

Description

yarn kjo md --readme is used to generate Markdown files in this repo. It's currently broken.

$ yarn kjo md --readme 

[kjo] yarn ts-node ./dev/readme
~/Projects/bud/node_modules/ts-node/src/index.ts:750
    return new TSError(diagnosticText, diagnosticCodes);
           ^
TSError: β¨― Unable to compile TypeScript:
dev/readme/renderer/Renderer.ts:79:26 - error TS2349: This expression is not callable.
  Type '{ default: <Type, Props, Container, Instance, TextInstance, SuspenseInstance, HydratableInstance, PublicInstance, HostContext, UpdatePayload, ChildSet, TimeoutHandle, NoTimeout>(config: HostConfig<Type, Props, Container, Instance, TextInstance, SuspenseInstance, HydratableInstance, ... 5 more ..., NoTimeout>) => Rec...' has no call signatures.

79 const MarkdownRenderer = Reconciler(HostConfig)
                            ~~~~~~~~~~

  dev/readme/renderer/Renderer.ts:1:1
    1 import * as Reconciler from 'react-reconciler'
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.

    at createTSError (~/Projects/bud/node_modules/ts-node/src/index.ts:750:12)
    at reportTSError (~/Projects/bud/node_modules/ts-node/src/index.ts:754:19)
    at getOutput (~/Projects/bud/node_modules/ts-node/src/index.ts:941:36)
    at Object.compile (~/Projects/bud/node_modules/ts-node/src/index.ts:1243:30)
    at Module.m._compile (~/Projects/bud/node_modules/ts-node/src/index.ts:1370:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Object.require.extensions.<computed> [as .ts] (~/Projects/bud/node_modules/ts-node/src/index.ts:1374:12)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  diagnosticText: '\x1B[96mdev/readme/renderer/Renderer.ts\x1B[0m:\x1B[93m79\x1B[0m:\x1B[93m26\x1B[0m - \x1B[91merror\x1B[0m\x1B[90m TS2349: \x1B[0mThis expression is not callable.\n' +
    "  Type '{ default: <Type, Props, Container, Instance, TextInstance, SuspenseInstance, HydratableInstance, PublicInstance, HostContext, UpdatePayload, ChildSet, TimeoutHandle, NoTimeout>(config: HostConfig<Type, Props, Container, Instance, TextInstance, SuspenseInstance, HydratableInstance, ... 5 more ..., NoTimeout>) => Rec...' has no call signatures.\n" +
    '\n' +
    '\x1B[7m79\x1B[0m const MarkdownRenderer = Reconciler(HostConfig)\n' +
    '\x1B[7m  \x1B[0m \x1B[91m                         ~~~~~~~~~~\x1B[0m\n' +
    '\n' +
    '  \x1B[96mdev/readme/renderer/Renderer.ts\x1B[0m:\x1B[93m1\x1B[0m:\x1B[93m1\x1B[0m\n' +
    "    \x1B[7m1\x1B[0m import * as Reconciler from 'react-reconciler'\n" +
    '    \x1B[7m \x1B[0m \x1B[96m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\x1B[0m\n' +
    '    Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.\n',
  diagnosticCodes: [ 2349 ]
}

Feature: multi-compiler support

Summary

Bud should support multi-compiler configurations.

Motivation

Webpack 5 supports passing an array of configurations to the compiler. This would be a very cool feature to include in Bud.

Prime use case: differing configs in admin and frontend contexts.

Additional context

  • Encore docs
  • The biggest issue is going to be reworking the dashboard to support providing the status of more than one compilation. @roots/bud-framework already has the groundwork in place to support managing multiple instances.

Eslint doesn't consistently report errors with persistent cache

Description

When cache is persisted to disk, @roots/bud-eslint inconsistently reports errors.

Steps to reproduce

  1. Install @roots/bud-eslint
  2. Call bud.persist()
  3. Run a build with a JS syntax error

Expected behavior:

  • Errors are reported to console

Actual behavior:

  • Errors are reported initially
  • Subsequent rebuilds are emitted (with errors) and nothing is reported

Reproduces how often:

100%

Versions

4.1.0

Add typechecks: template literal keys for @roots/container

Summary

Typescript 4.1 introduced support template literal types. This is is a natch addition for @roots/container.

Motivation

Having template literal typings would allow us to be type safe when interacting with containers that utilize a set schema. For instance, the bud.config object is more-or-less a 1:1 mapping of the Webpack.Configuration type.

As is you can do something like bud.config.set('context', 999) and @roots/container will gladly accept it.

With mapped template literal types that value would be refused (as it isn't a string).

Additional context

This typing should be optional. One of the strengths of the Container class is its flexibility when there isn't a set schema.

GitHub Actions: Publish npm pre-releases

Summary

Setup a new GitHub action for publishing pre-releases to npm on every commit to the next branch

Additional context

Manual process example (via @QWp6t):

git clean -fxd
dcr bud yarn kjo make ci
dcr bud yarn workspaces foreach --no-private version preminor
git add --all
git commit -am 'vX.Y.Z-N'
git push
yarn workspaces foreach --no-private npm publish --access public

Build fails if Git repo has no commits

Description

/Users/knowler/code/testing-bud/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

Error: Command failed with exit code 128: git rev-parse --short HEAD --no-color
fatal: Needed a single revision
    at makeError (/Users/knowler/code/testing-bud/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/Users/knowler/code/testing-bud/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  shortMessage: 'Command failed with exit code 128: git rev-parse --short HEAD --no-color',
  command: 'git rev-parse --short HEAD --no-color',
  exitCode: 128,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: 'fatal: Needed a single revision',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Steps to reproduce

Initialize a new git repo, but don't commit anything. git init.

Versions

You can get this information from referencing CHANGELOG.md. Also, please include the OS and what version of the OS you're running.

bud 4.1.0
Node 16
macOS 11.3.1

Additional information

Any additional information, configuration or data that might be necessary to reproduce the issue.

@roots/bud-sass does not include postcss-scss

Problem

@roots/bud-sass does not configure postcss' syntax option with postcss-scss

easy workaround for now. add anywhere in bud.config.js:

/**
  * Add postcss-scss syntax
  *
  * @remarks
  * fix for @roots/bud@^5.0.0-next.16. 
  * can be removed in @roots/bud@^5.0.0-next.17.
  *
  * @see {@link https://git.io/JM8ym}
  */
config.tap(bud => {
  const options = bud.build.items.postcss.options(app);
  options.postcssOptions.syntax = 'postcss-scss';
}) 
// ...rest of sage configuration

ref: #731

Test: Jest fails when using --coverage flag

Description

When running jest with the --coverage flag the tests fail early.

Steps to reproduce

  1. run jest --coverage.

Expected behavior:

Coverage tests are emitted to console

Actual behavior:

Tests fail. Emits to console:

 FAIL  tests/bud-build/config.dev.ts
  ● Test suite failed to run

    Jest worker encountered 4 child process exceptions, exceeding retry limit

      at ChildProcessWorker.initialize (node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)

Reproduces how often: 100%

Versions

  • latest

Bug: @roots/bud-imagemin svgo misconfiguration

Description

Affecting v4.5.0.

@roots/bud-imagemin has a misconfiguration effecting svg assets.

As a temporary workaround, use this in bud.config.js:

bud.imagemin.plugins([
  ['gifsicle', {interlaced: true}],
  ['jpegtran', {progressive: true}],
  ['optipng', {optimizationLevel: 7}],
  ['svgo', {removeViewBox: false}],
])

bud.imagemin.plugins returns bud so you are fine to keep chaining fn calls afterward.

Support Webpack v5

Summary

Issue to track progress on Webpack 5.

Motivation

Webpack 5 is better in a number of ways. The biggest improvements are to caching mechanisms but there are a lot of other improvements.

Status

  • Drat PR available #43

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • πŸ“¦ deps: update caniuse-lite to v1.0.30001434
  • πŸ“¦ deps: update docusaurus-lunr-search to v2.3.2
  • πŸ“¦ deps: update parse5 to v7.1.2
  • πŸ“¦ deps: update postcss-preset-env to v7.8.3
  • πŸ“¦ deps: update Yarn to v3.3.0
  • πŸ“¦ deps: update mini-css-extract-plugin to v2.7.0
  • πŸ“¦ deps: update playwright to v1.28.0
  • πŸ“¦ deps: update typescript to v4.9.3
  • πŸ“¦ deps: update typescript-eslint monorepo to v5.44.0 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • πŸ“¦ deps: update verdaccio to v5.17.0
  • πŸ“¦ deps: update vitest monorepo to v0.25.2 (@vitest/coverage-istanbul, @vitest/ui, vitest)
  • πŸ“¦ deps: update wordpress monorepo (@wordpress/blocks, @wordpress/data, @wordpress/hooks, @wordpress/plugins, @wordpress/rich-text)
  • πŸ“¦ deps: update npm to v9
  • πŸ“¦ deps: update webpack-dev-middleware to v6
  • πŸ” Create all rate-limited PRs at once πŸ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

bundler
sources/@repo/notifier/Ruby/Gemfile
docker-compose
config/docker-compose.yml
tests/util/project/docker-compose.yml
  • mysql 8.0
github-actions
.github/workflows/codeql-analysis.yml
  • actions/checkout v3
  • github/codeql-action v2
  • github/codeql-action v2
  • github/codeql-action v2
.github/workflows/discourse.yml
.github/workflows/docs.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
.github/workflows/labeler.yml
.github/workflows/release.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
.github/workflows/test.e2e.yml
  • actions/setup-node v3
  • actions/checkout v3
  • actions/cache v3
.github/workflows/test.format.yml
  • actions/setup-node v3
  • actions/checkout v3
  • actions/cache v3
.github/workflows/test.integration.yml
  • actions/setup-node v3
  • actions/checkout v3
  • actions/cache v3
.github/workflows/test.unit.yml
  • actions/setup-node v3
  • actions/checkout v3
  • actions/cache v3
npm
.yarn/sdks/eslint/package.json
.yarn/sdks/prettier/package.json
.yarn/sdks/typescript/package.json
package.json
  • @skypack/package-check 0.2.2
  • @types/express 4.17.14
  • @types/fs-extra 9.0.13
  • @types/node 16.18.3
  • @typescript-eslint/eslint-plugin 5.42.1
  • @typescript-eslint/parser 5.42.1
  • @vitest/coverage-istanbul 0.24.5
  • @vitest/ui 0.24.5
  • eslint 8.27.0
  • eslint-plugin-import 2.26.0
  • eslint-plugin-react 7.31.10
  • eslint-plugin-react-hooks 4.6.0
  • eslint-plugin-simple-import-sort 8.0.0
  • execa 6.1.0
  • fs-extra 10.1.0
  • import-meta-resolve 2.1.0
  • playwright 1.27.1
  • prettier 2.7.1
  • syncpack 8.3.9
  • tinybench 2.3.1
  • ts-node 10.9.1
  • tslib 2.4.1
  • typescript 4.8.4
  • vitest 0.24.5
  • webpack 5.75.0
  • eslint-plugin-n 15.5.1
  • node 16.18.0
  • node 16.18.0
  • yarn 1.22.19
  • npm 8.19.2
  • yarn 3.2.4
sources/@repo/compile-kit/package.json
  • @types/fs-extra 9.0.13
  • @types/lodash-es 4.17.6
  • @types/node 16.18.3
  • @vercel/ncc 0.34.0
  • download-package-tarball 1.0.7
  • fs-extra 10.1.0
  • get-package-json-from-registry 2.2.2
  • lodash-es 4.17.21
  • npm-package-arg 10.0.0
  • registry-info 1.0.0
  • vitest 0.24.5
  • node >=16.0.0
  • yarn 3.2.4
sources/@repo/constants/package.json
  • @types/node 16.18.3
  • vitest 0.24.5
  • yarn 3.2.4
sources/@repo/docs/package.json
  • @docusaurus/theme-classic 2.2.0
  • @docusaurus/theme-common 2.2.0
  • axios 1.1.3
  • clsx 1.2.1
  • docusaurus-lunr-search 2.3.1
  • react 17.0.2
  • react-dom 17.0.2
  • tslib 2.4.1
  • @docusaurus/core 2.2.0
  • @docusaurus/module-type-aliases 2.2.0
  • @docusaurus/preset-classic 2.2.0
  • @docusaurus/remark-plugin-npm2yarn 2.2.0
  • @svgr/webpack 6.5.1
  • @tsconfig/docusaurus 1.0.6
  • @types/node 16.18.3
  • @types/react 17.0.52
  • @types/react-dom 17.0.18
  • @types/react-helmet 6.1.5
  • @types/react-reconciler 0.28.0
  • @types/react-router-dom 5.3.3
  • file-loader 6.2.0
  • netlify-cli 12.1.1
  • raw-loader 4.0.2
  • ts-node 10.9.1
  • typescript 4.8.4
  • url-loader 4.1.1
  • webpack 5.75.0
  • node ^16.3.0
  • node 16.18.0
  • yarn 1.22.19
sources/@repo/logger/package.json
  • @types/node 16.18.3
  • signale 1.4.0
  • vitest 0.24.5
  • yarn 3.2.4
sources/@repo/markdown-kit/package.json
  • dotenv 16.0.3
  • execa 6.1.0
  • fs-extra 10.1.0
  • globby 13.1.2
  • handlebars 4.7.7
  • helpful-decorators 2.1.0
  • json5 2.2.1
  • lodash-es 4.17.21
  • octokit 2.0.10
  • prettier 2.7.1
  • strip-ansi 7.0.1
  • typescript 4.8.4
  • @types/node 16.18.3
  • @types/prettier 2.7.1
  • vitest 0.24.5
  • yarn 3.2.4
sources/@repo/notifier/package.json
  • @types/node 16.18.3
  • vitest 0.24.5
sources/@repo/test-kit/package.json
  • @types/fs-extra 9.0.13
  • @types/node 16.18.3
  • chalk 5.1.2
  • execa 6.1.0
  • fs-extra 10.1.0
  • globby 13.1.2
  • helpful-decorators 2.1.0
  • json5 2.2.1
  • tslib 2.4.1
  • vitest 0.24.5
  • yarn 3.2.4
sources/@repo/yarn-plugin-bud/package.json
  • @yarnpkg/cli 3.2.4
  • @yarnpkg/core 3.2.5
  • @yarnpkg/shell 3.2.4
  • clipanion 3.2.0-rc.13
  • fs-extra 10.1.0
  • helpful-decorators 2.1.0
  • js-yaml 4.1.0
  • lodash 4.17.21
  • pm2 5.2.2
  • semver 7.3.8
  • tslib 2.4.1
  • typescript 4.8.4
  • verdaccio 5.16.3
  • @types/fs-extra 9.0.13
  • @types/node 16.18.3
  • @yarnpkg/builder 3.2.5
  • node 16.18.0
  • npm 8.19.2
  • yarn 1.22.19
  • yarn 3.2.4
sources/@repo/yarn-plugin-package/package.json
  • @types/fs-extra 9.0.13
  • @types/node 16.18.3
  • @yarnpkg/builder 3.2.5
  • @yarnpkg/cli 3.2.4
  • @yarnpkg/core 3.2.5
  • @yarnpkg/shell 3.2.4
  • clipanion 3.2.0-rc.13
  • fs-extra 10.1.0
  • helpful-decorators 2.1.0
  • lodash-es 4.17.21
  • tslib 2.4.1
  • typescript 4.8.4
  • vitest 0.24.5
  • yarn 3.2.4
sources/@roots/browserslist-config/package.json
  • @skypack/package-check 0.2.2
  • node >=16
sources/@roots/bud-api/package.json
  • chalk 5.1.2
  • get-port 6.1.2
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • copy-webpack-plugin 11.0.0
  • html-webpack-plugin 5.5.0
  • node >=16
sources/@roots/bud-babel/package.json
  • @babel/core 7.20.2
  • @babel/plugin-proposal-class-properties 7.18.6
  • @babel/plugin-proposal-object-rest-spread 7.20.2
  • @babel/plugin-syntax-dynamic-import 7.8.3
  • @babel/plugin-transform-runtime 7.19.6
  • @babel/preset-env 7.20.2
  • babel-loader 9.1.0
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • @babel/core *
  • @babel/plugin-proposal-class-properties *
  • @babel/plugin-proposal-object-rest-spread *
  • @babel/plugin-syntax-dynamic-import *
  • @babel/plugin-transform-runtime *
  • @babel/preset-env *
  • babel-loader *
  • node >=16
sources/@roots/bud-build/package.json
  • css-loader ^6.7.1
  • csv-loader ^3.0.5
  • file-loader ^6.2.0
  • fs-extra 10.1.0
  • helpful-decorators 2.1.0
  • html-loader ^4.2.0
  • json5 2.2.1
  • mini-css-extract-plugin 2.6.1
  • remark 14.0.2
  • remark-html 15.0.1
  • remark-loader 5.0.0
  • style-loader 3.3.1
  • toml 3.0.0
  • xml-loader 1.2.1
  • yml-loader 2.1.0
  • @skypack/package-check 0.2.2
  • @types/fs-extra 9.0.13
  • @types/mini-css-extract-plugin 2.5.1
  • @types/node 16.18.3
  • node >=16
sources/@roots/bud-cache/package.json
  • strip-ansi 7.0.1
  • @skypack/package-check 0.2.2
  • node >=16
sources/@roots/bud-client/package.json
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • @types/webpack-env 1.18.0
  • node >=16
sources/@roots/bud-compiler/package.json
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • node >=16
sources/@roots/bud-compress/package.json
  • compression-webpack-plugin ^10.0.0
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • node >=16
sources/@roots/bud-criticalcss/package.json
  • critical 5.0.3
  • vinyl 3.0.0
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • node >=16
sources/@roots/bud-criticalcss/src/__fixtures__/extract-func/package.json
sources/@roots/bud-criticalcss/src/__fixtures__/extract/package.json
sources/@roots/bud-criticalcss/src/__fixtures__/no-extract/package.json
sources/@roots/bud-dashboard/package.json
  • chalk 5.1.2
  • figures 5.0.0
  • human-readable 0.2.1
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • ink-testing-library 2.1.0
  • node >=16
sources/@roots/bud-emotion/package.json
  • @emotion/babel-plugin ^11.10.5
  • @emotion/css ^11.10.5
  • @emotion/react ^11.10.5
  • @emotion/styled ^11.10.5
  • @swc/plugin-emotion 2.5.21
  • @babel/core 7.20.2
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • @types/react 17.0.52
  • react 17.0.2
  • @emotion/babel-plugin *
  • @emotion/css *
  • @emotion/react *
  • @emotion/styled *
  • node >=16
sources/@roots/bud-entrypoints/package.json
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • node >=16
sources/@roots/bud-esbuild/package.json
  • esbuild-loader 2.20.0
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • esbuild-loader *
  • ts-node *
  • node >=16
sources/@roots/bud-eslint/package.json
  • eslint 8.27.0
  • eslint-webpack-plugin ^3.2.0
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • eslint *
  • node >=16
sources/@roots/bud-extensions/package.json
  • clean-webpack-plugin 4.0.0
  • copy-webpack-plugin 11.0.0
  • html-webpack-plugin 5.5.0
  • mini-css-extract-plugin 2.6.1
  • webpack-manifest-plugin 5.0.0
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • palette-webpack-plugin 1.0.5
  • clean-webpack-plugin *
  • copy-webpack-plugin *
  • html-webpack-plugin *
  • mini-css-extract-plugin *
  • webpack-manifest-plugin *
  • node >=16
sources/@roots/bud-framework/package.json
  • tslib 2.4.1
  • @skypack/package-check 0.2.2
  • @types/http-proxy 1.17.9
  • @types/js-yaml 4.0.5
  • @types/node 16.18.3
  • chokidar 3.5.3
  • http-proxy-middleware 2.0.6
  • node >=16
sources/@roots/bud-hooks/package.json
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • node >=16
sources/@roots/bud-imagemin/package.json
  • @squoosh/lib ^0.4.0
  • image-minimizer-webpack-plugin ^3.8.1
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • @squoosh/lib *
  • image-minimizer-webpack-plugin *
  • node >=16
sources/@roots/bud-mdx/package.json
  • @mdx-js/loader ^2.1.5
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • react 17.0.2
  • react-dom 17.0.2
  • @mdx-js/loader *
  • node >=16
sources/@roots/bud-postcss/package.json
  • postcss 8.4.19
  • postcss-import 15.0.0
  • postcss-loader 7.0.1
  • postcss-nested 6.0.0
  • postcss-preset-env 7.8.2
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • @types/signale 1.4.4
  • postcss *
  • postcss-import *
  • postcss-loader *
  • postcss-nested *
  • postcss-preset-env *
  • node >=16
sources/@roots/bud-preset-recommend/package.json
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • node >=16
sources/@roots/bud-preset-wordpress/package.json
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • node >=16
sources/@roots/bud-prettier/package.json
  • prettier 2.7.1
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • prettier *
  • node >=16
sources/@roots/bud-purgecss/package.json
  • @fullhuman/postcss-purgecss 5.0.0
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • postcss 8.4.19
  • @fullhuman/postcss-purgecss *
  • node >=16
sources/@roots/bud-react/package.json
  • @babel/preset-react ^7.18.6
  • @pmmmwh/react-refresh-webpack-plugin ^0.5.9
  • react 17.0.2
  • react-dom 17.0.2
  • react-hot-loader ^4.13.0
  • react-refresh ^0.14.0
  • @babel/core 7.20.2
  • @skypack/package-check 0.2.2
  • @types/babel__core 7.1.20
  • @types/node 16.18.3
  • @types/react 17.0.52
  • @types/react-dom 17.0.18
  • @pmmmwh/react-refresh-webpack-plugin *
  • react *
  • react-dom *
  • node >=16
sources/@roots/bud-sass/package.json
  • postcss-scss ^4.0.5
  • resolve-url-loader 5.0.0
  • sass ^1.56.1
  • sass-loader ^13.2.0
  • stylelint-config-recommended-scss ^8.0.0
  • stylelint-scss ^4.3.0
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • postcss 8.4.19
  • stylelint 14.14.1
  • postcss-scss *
  • sass *
  • sass-loader *
  • stylelint-config-recommended-scss *
  • stylelint-scss *
  • node >=16
sources/@roots/bud-server/package.json
  • ansi-html-community 0.0.8
  • chokidar 3.5.3
  • cookie-parser 1.4.6
  • express 4.18.2
  • http-proxy-middleware 2.0.6
  • webpack-dev-middleware 5.3.3
  • @skypack/package-check 0.2.2
  • @types/cookie-parser 1.4.3
  • @types/express 4.17.14
  • @types/node 16.18.3
  • @types/webpack-dev-middleware 5.3.0
  • node >=16
sources/@roots/bud-solid/package.json
  • @babel/plugin-syntax-jsx 7.18.6
  • babel-preset-solid 1.6.2
  • solid-js 1.6.2
  • @babel/core 7.20.2
  • @skypack/package-check 0.2.2
  • @types/babel__core 7.1.20
  • @types/node 16.18.3
  • @babel/plugin-syntax-jsx *
  • babel-preset-solid *
  • solid-js *
  • node >=16
sources/@roots/bud-stylelint/package.json
  • stylelint 14.14.1
  • stylelint-config-standard 29.0.0
  • stylelint-webpack-plugin 3.3.0
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • stylelint *
  • stylelint-config-standard *
  • stylelint-scss *
  • stylelint-webpack-plugin *
  • node >=16
sources/@roots/bud-support/package.json
  • chalk 5.1.2
  • clean-stack 5.0.1
  • clipanion 3.2.0-rc.13
  • common-path 1.0.1
  • execa 6.1.0
  • figures 5.0.0
  • fs-extra 10.1.0
  • fs-jetpack 5.1.0
  • globby 13.1.2
  • helpful-decorators 2.1.0
  • highlight.js 11.6.0
  • import-meta-resolve 2.1.0
  • ink 3.2.0
  • ink-link 2.0.0
  • ink-text-input 4.0.3
  • lodash-es 4.17.21
  • parse5 7.1.1
  • parse5-htmlparser2-tree-adapter 7.0.0
  • patch-console 1.0.0
  • pretty-format 29.3.1
  • react 17.0.2
  • signale 1.4.0
  • typanion 3.12.1
  • type-fest 3.2.0
  • webpack 5.75.0
  • zod 3.19.1
  • zod-validation-error 0.2.1
  • @skypack/package-check 0.2.2
  • webpack >=5
  • node >=16
sources/@roots/bud-swc/package.json
  • @swc/core 1.3.14
  • swc-loader 0.2.3
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • @swc/core *
  • swc-loader *
  • ts-node *
  • node >=16
sources/@roots/bud-tailwindcss/package.json
  • @types/fs-extra 9.0.13
  • autoprefixer ^10.4.13
  • tailwindcss 3.2.4
  • webpack-virtual-modules 0.4.6
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • @types/tailwindcss 3.1.0
  • @types/webpack-virtual-modules 0.1.1
  • autoprefixer *
  • tailwindcss *
  • node >=16
sources/@roots/bud-terser/package.json
  • css-minimizer-webpack-plugin 4.2.2
  • terser-webpack-plugin ^5.3.6
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • node >=16
sources/@roots/bud-typescript/package.json
  • @types/webpack-env 1.18.0
  • chalk 5.1.2
  • fork-ts-checker-webpack-plugin ^7.2.13
  • react-refresh-typescript 2.0.7
  • ts-loader ^9.4.1
  • ts-node 10.9.1
  • typescript 4.8.4
  • @skypack/package-check 0.2.2
  • @types/fork-ts-checker-webpack-plugin 0.4.5
  • @types/node 16.18.3
  • fork-ts-checker-webpack-plugin *
  • react-refresh-typescript *
  • ts-loader *
  • ts-node *
  • typescript *
  • node >=16
sources/@roots/bud-vue/package.json
  • @vue/compiler-sfc ^3.2.45
  • parse-semver 1.1.1
  • vue ^3.2.45
  • vue-loader ^17.0.1
  • vue-style-loader ^4.1.3
  • vue-template-compiler ^2.7.14
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • @vue/compiler-sfc *
  • vue *
  • vue-loader *
  • vue-style-loader *
  • vue-template-compiler *
  • node >=16
sources/@roots/bud-wordpress-dependencies/package.json
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • node >=16
sources/@roots/bud-wordpress-externals/package.json
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • node >=16
sources/@roots/bud-wordpress-manifests/package.json
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • node >=16
sources/@roots/bud/package.json
  • browserslist 4.21.4
  • caniuse-lite 1.0.30001431
  • dotenv 16.0.3
  • dotenv-expand 9.0.0
  • node-notifier 10.0.1
  • open 8.4.0
  • open-editor 4.0.0
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • @types/node-notifier 8.0.2
  • browserslist *
  • caniuse-lite *
  • node >=16.0.0
sources/@roots/container/package.json
  • helpful-decorators 2.1.0
  • lodash-es 4.17.21
  • @skypack/package-check 0.2.2
  • @types/lodash-es 4.17.6
  • @types/node 16.18.3
  • type-fest 3.2.0
  • node >=16
sources/@roots/critical-css-webpack-plugin/package.json
  • critical 5.0.3
  • helpful-decorators 2.1.0
  • vinyl 3.0.0
  • webpack 5.75.0
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • @types/vinyl 2.0.7
  • critical *
  • node >=16
sources/@roots/dependencies/package.json
  • helpful-decorators 2.1.0
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • node >=16
sources/@roots/entrypoints-webpack-plugin/package.json
  • helpful-decorators 2.1.0
  • lodash-es 4.17.21
  • tslib 2.4.1
  • @skypack/package-check 0.2.2
  • @types/lodash-es 4.17.6
  • @types/node 16.18.3
  • webpack 5.75.0
  • webpack >=5
  • node >=16
sources/@roots/eslint-config/package.json
  • @babel/eslint-parser 7.19.1
  • @typescript-eslint/eslint-plugin 5.42.1
  • @typescript-eslint/parser 5.42.1
  • eslint-config-prettier 8.5.0
  • eslint-plugin-import 2.26.0
  • eslint-plugin-jsx-a11y ^6.6.1
  • eslint-plugin-prettier ^4.2.1
  • eslint-plugin-react 7.31.10
  • eslint-plugin-react-hooks 4.6.0
  • @babel/core 7.20.2
  • @skypack/package-check 0.2.2
  • @types/babel__core 7.1.20
  • @types/node 16.18.3
  • @types/prettier 2.7.1
  • eslint 8.27.0
  • prettier 2.7.1
  • node >=16
sources/@roots/filesystem/package.json
  • @aws-sdk/abort-controller 3.208.0
  • @aws-sdk/client-s3 3.209.0
  • @aws-sdk/lib-storage 3.209.0
  • @types/lodash-es 4.17.6
  • fs-jetpack 5.1.0
  • globby 13.1.2
  • helpful-decorators 2.1.0
  • js-yaml 4.1.0
  • json5 2.2.1
  • lodash-es 4.17.21
  • mime-types 2.1.35
  • safe-json-stringify 1.2.0
  • @skypack/package-check 0.2.2
  • @types/js-yaml 4.0.5
  • @types/mime-types 2.1.1
  • @types/node 16.18.3
  • @types/safe-json-stringify 1.1.2
  • node >=16
sources/@roots/merged-manifest-webpack-plugin/package.json
  • fs-extra 10.1.0
  • helpful-decorators 2.1.0
  • @skypack/package-check 0.2.2
  • @types/fs-extra 9.0.13
  • @types/node 16.18.3
  • webpack 5.75.0
  • node >=16
sources/@roots/sage/package.json
  • @skypack/package-check 0.2.2
  • @types/node 16.18.3
  • tailwindcss 3.2.4
  • node >=16
sources/@roots/wordpress-dependencies-webpack-plugin/package.json
  • helpful-decorators 2.1.0
  • lodash-es 4.17.21
  • @skypack/package-check 0.2.2
  • @types/lodash-es 4.17.6
  • @types/node 16.18.3
  • webpack 5.75.0
  • node >=16
sources/@roots/wordpress-externals-webpack-plugin/package.json
  • lodash-es 4.17.21
  • webpack 5.75.0
  • @skypack/package-check 0.2.2
  • @types/lodash-es 4.17.6
  • @types/node 16.18.3
  • node >=16
sources/@roots/wordpress-hmr/package.json
  • lodash-es 4.17.21
  • react 17.0.2
  • @skypack/package-check 0.2.2
  • @types/lodash-es 4.17.6
  • @types/node 16.18.3
  • @types/react 17.0.52
  • @types/wordpress__blocks 11.0.7
  • @types/wordpress__data 6.0.1
  • @wordpress/blocks 11.20.0
  • @wordpress/data 7.5.0
  • @wordpress/hooks 3.21.0
  • @wordpress/plugins 4.19.0
  • @wordpress/rich-text 5.19.0
  • node >=16
storage/package.json
  • pm2 ^5.2.2
  • verdaccio ^5.17.0
tests/reproductions/issue-1798/package.json
tests/reproductions/issue-1886/package.json
tests/reproductions/issue-1890/package.json
tests/util/project/package.json
  • node 16.18.0

  • Check this box to trigger a request for Renovate to run again on this repository

Scripts get wrong dependency when using @wordpress/icons package

Description

When trying to use one of the Gutenberg Icons from the @wordpress/icons package the script won't get enqueued by acorn because bud is adding "wp-icons" as a dependency to the entrypoints.json file. wp-icons doesn't exist and can't be enqueued by wordpress.

Steps to reproduce

  1. create a JS file like this:
import { registerBlockType } from '@wordpress/blocks';
import { globe as icon } from '@wordpress/icons';

import Edit from './edit';
import save from './save';

registerBlockType('example/block', {
  icon,
  /**
   * @see ./edit.js
   */
  edit: Edit,

  /**
   * @see ./save.js
   */
  save,
});
  1. run bud build
  2. check entrypoints.json if there is a "wp-icons" dependency

Expected behavior: The script should get enqueued and @wordpress/icons shouldn't get extracted / referenced as an external

Actual behavior: @wordpress/icons gets treated like the other externals and the script won't enqueue

Reproduces how often: everytime.

Versions

@roots/bud/5.0.0-next.16 linux-x64 node-v16.13.0

Improve: webpack warnings output in @roots/bud-dashboard

Summary

It seems webpack warnings are not displayed properly in the bud dashboard. They should be presented to users.

For now users can use --no-dashboard for raw webpack output (the dashboard will not be used).

ref: #746

Motivation

I think the dashboard is really nice but it needs to display warnings in order to be a good replacement for webpack default stats.

bug: build error when using memory cache

Description

Build error when not using bud.persist(). Error message:

Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
         - configuration.cache.type should be "filesystem".
           -> Filesystem caching.

fix: override utility implementation is flawed

Description

presently override takes a config object and merges it with the final webpack config. this is fine up to a point, but if you are modifying some deep value you will need to handle the merge logic yourself and this utility does not provide the tools to do so.

rather than taking an object parameter it is better for it to take a callback which passes you the config to modify as needed.

so rather than doing something like this:

bud.override({...webpackConf})

we want this:

bud.override(webpackConf => ({...webpackConf})

Additional information

there is already a way to do this and the implementation will be little more than a macro for it:

bud.hooks.on('config.override', webpackConfig => ({
  ...webpackConfig,
  // ...your config modifications
}))

so, if you need something like this right now you can use the above hook in the interim.

ref: https://discourse.roots.io/t/bud-and-ecmascript-modules-esm/21743/5?u=qwp6t

Bud accidentally itself when using `bud init`. Is this dangerous?

Description

When using yarn bud init, for example, bud appears to delete itself from node_modules.

Steps to reproduce

  1. set up a repo with a bud config that uses an extension that has dependencies
  2. yarn install
  3. yarn bud init <-- oopsie! πŸ’€
  4. yarn bud build <-- fails 😒

Expected behavior: I want my node_modules/@roots folder to still exist

Actual behavior: My node_modules/@roots gets deleted

Reproduces how often: πŸ’―

Versions

v5.0.0-next.0 on Ubuntu via WSL2 in Windows 10

Additional information

I didn't check, but it might actually be wiping out the entire node_modules folder before installing dependencies, but it probably shouldn't be doing that either.

Build failing due to webpack misconfiguration error on 4.0.1

Description

Using Bud 4.0.1 with Node 16.1.0 and Yarn 1.22.10 (on macOS 11.3.1) running yarn bud build fails with the following:

Output

This isn't the full output:

$ /Users/knowler/code/trying-bud/node_modules/.bin/bud build


 β–ˆβ–„β–„ β–ˆ β–ˆ β–ˆβ–€β–„
 β–ˆβ–„β–ˆ β–ˆβ–„β–ˆ β–ˆβ–„β–€
















 ERROR  Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
         - configuration.cache.type should be "memory".
           -> In memory caching.

 -  - configuration.cache.type should be "memory".
 -    -> In memory caching.
 - validate (node_modules/schema-utils/dist/validate.js:104:11)
 - validateSchema (node_modules/webpack/lib/validateSchema.js:79:2)
 - create (node_modules/webpack/lib/webpack.js:109:24)
 - webpack (node_modules/webpack/lib/webpack.js:147:32)
 - Object.f (node_modules/webpack/lib/index.js:54:15)
 - default_1.compile (node_modules/@roots/bud-compiler/lib/cjs/Compiler/index.js:38:42)
 -  (node_modules/@roots/bud-dashboard/lib/cjs/hooks/useCompilation.js:52:39)
 - commitHookEffectList (node_modules/react-reconciler/cjs/react-reconciler.development.js:12025:26)
 - commitPassiveHookEffects (node_modules/react-reconciler/cjs/react-reconciler.development.js:12059:11)
 - Object.invokeGuardedCallbackImpl (node_modules/react-reconciler/cjs/react-reconciler.development.js:11563:10)

/Users/knowler/code/trying-bud/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

Error: Command failed with exit code 128: git rev-parse --short HEAD --no-color
fatal: Needed a single revision
    at makeError (/Users/knowler/code/trying-bud/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/Users/knowler/code/trying-bud/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  shortMessage: 'Command failed with exit code 128: git rev-parse --short HEAD --no-color',
  command: 'git rev-parse --short HEAD --no-color',
  exitCode: 128,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: 'fatal: Needed a single revision',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
bud.config.js
module.exports = bud => bud.entry('app', ['app.js']);
package.json
{
  "private": true,
  "devDependencies": {
    "@roots/bud": "^4.0.1",
    "@roots/bud-cli": "^4.0.1"
  }
}
Project structure
.
β”œβ”€β”€ src
β”‚  └── app.js
β”œβ”€β”€ bud.config.js
β”œβ”€β”€ package.json
└── yarn.lock

Build workflow fails with out of memory error

Description

Github build workflow fails with out of memory error

Steps to reproduce

  1. Submit a PR
  2. Build fails

Expected behavior:

Build succeeds if PR is buildable locally.

Actual behavior:

Build fails. See https://github.com/roots/bud/runs/2647230668

Reproduces how often:

100%

Versions

4.1.0

Additional information

➀ YN0000: [@roots/bud-preset-recommend]: Process started
➀ YN0000: [@roots/bud-preset-recommend]: Internal Error: spawn ENOMEM
➀ YN0000: [@roots/bud-preset-recommend]:     at ChildProcess.spawn (internal/child_process.js:402:11)
➀ YN0000: [@roots/bud-preset-recommend]:     at Object.spawn (child_process.js:553:9)
➀ YN0000: [@roots/bud-preset-recommend]:     at Function.sR [as default] (/home/runner/work/bud/bud/.yarn/releases/yarn-sources.cjs:4:6917)
➀ YN0000: [@roots/bud-preset-recommend]:     at th.implementation (/home/runner/work/bud/bud/.yarn/releases/yarn-sources.cjs:249:1507)
➀ YN0000: [@roots/bud-preset-recommend]:     at th.exec (/home/runner/work/bud/bud/.yarn/releases/yarn-sources.cjs:252:1582)
➀ YN0000: [@roots/bud-preset-recommend]:     at th.run (/home/runner/work/bud/bud/.yarn/releases/yarn-sources.cjs:252:1753)
➀ YN0000: [@roots/bud-preset-recommend]:     at CCe (/home/runner/work/bud/bud/.yarn/releases/yarn-sources.cjs:256:5987)
➀ YN0000: [@roots/bud-preset-recommend]:     at processTicksAndRejections (internal/process/task_queues.js:93:5)
➀ YN0000: [@roots/bud-preset-recommend]:     at async s (/home/runner/work/bud/bud/.yarn/releases/yarn-sources.cjs:256:6086)
➀ YN0000: [@roots/bud-preset-recommend]:     at async mCe (/home/runner/work/bud/bud/.yarn/releases/yarn-sources.cjs:257:14)
➀ YN0000: [@roots/bud-preset-recommend]: Process exited (exit code 1), completed in 0s 774ms
➀ YN0000: The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph

fatal error running `bud install`

Description

yarn bud install exits with a fatal error. npx bud install exits successfully and displays a success message but doesn't actually update the project package.json.

  • possibly related: #690
  • definitely related: #567

Steps to reproduce

  1. fresh install
  2. yarn bud install
  3. ☠️

Expected behavior:
Packages are installed and process exits cleanly with a success message displayed.

Actual behavior:
Packages are maybe installed depending on how yarn resolves them. Process ultimately exits with an error.

Reproduces how often:

  • 100% of the time there will be an error message (with yarn)
  • Sometimes packages will not be installed. node_modules might be empty. it might have modules in it but not all of them.

Versions

latest

Additional information

❯ yarn bud install
yarn run v1.22.17
$ [sage_root]/node_modules/.bin/bud install
…  awaiting  installing dependencies @wordpress/browserslist-config,4.1.0,eslint,7.32.0,prettier,2.4.1,tailwindcss,2.2.19,react,17.0.2,react-dom,17.0.2,postcss,8.3.11,postcss-import,14.0.2,postcss-nested,5.0.6,postcss-preset-env,7.0.0
yarn [1/5] Validating package.json...

yarn [2/5] Resolving packages...

yarn [3/5] Fetching packages...

yarn [4/5] Linking dependencies...

yarn [5/5] Building fresh packages...

yarn success Saved lockfile.

yarn success Saved 0 new dependencies.

βœ”  success   installation complete
node:internal/modules/cjs/loader:941
  const err = new Error(message);
              ^

Error: Cannot find module './lib/handle'
Require stack:
- [sage_root]/node_modules/@oclif/errors/handle.js
- [sage_root]/node_modules/@roots/bud/bin/bud
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
    at Function.Module._load (node:internal/modules/cjs/loader:774:27)
    at Module.require (node:internal/modules/cjs/loader:1013:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at module.exports ([sage_root]/node_modules/@oclif/errors/handle.js:1:25) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '[sage_root]/node_modules/@oclif/errors/handle.js',
    '[sage_root]/node_modules/@roots/bud/bin/bud'
  ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The bud install/bud init command runs yarn install and that overwrites @roots/bud (which is running the process). This doesn't effect the monorepo, only projects. I don't know if that's a yarn vs. yarn berry thing.

It doesn't cause this error with npx bud install but it also doesn't add the packages to the manifest.

bud install/bud init might be a fundamentally flawed idea. easiest path is to modify the project manifest and then tell the user to run the install themselves. This also means dropping the bud build command's --install flag. Ultimately, I really want to have it work the way it does in the monorepo.

For now I'll open a PR that changes bud install to:

  • modifies the package.json
  • informs the user that they need to run yarn or npm install

This will give us space to figure out how we might be able to include this feature as originally intended in a later release without the pressure of a busted command hanging over the project.

@QWp6t did you bump into this when you originally wrote the dependencies package for sage-cli?

Failed to load resource: unsupported URL

Description

On a fresh install of the latest version of roots/sage, after running yarn dev, css & js assets aren't loading. They've been compiled and are present in the public directory, but aren't loading while viewing localhost:3000.

Steps to reproduce

  1. git clone https://github.com/roots/sage.git
  2. Update bud.config.js with target url (in this case, "http://test.local"
  3. composer install && yarn && yarn dev
  4. visit localhost:3000 once it's ready

Expected behavior: [What you expect to happen]

CSS and JS assets should load.

Actual behavior: [What actually happens]

CSS and JS assets no not load.

Reproduces how often: [What percentage of the time does it reproduce?]

100%

Versions

roots/sage 10.0.0-beta.1: October 21st, 2021
DevKinsta Dev Suite (basically Docker with a frontend) Version 2.3.0 (2.3.0.2184)

Additional information

Looking at the source, it appears that the asset urls are being output as

<script src="localhost:3000/wp-content/themes/sage-652b7ae24ca422d61503483adfb9518d27696b26/public/runtime.a5b3e3.js" id="app/0-js"></script>
<script src="localhost:3000/wp-content/themes/sage-652b7ae24ca422d61503483adfb9518d27696b26/public/app.c27b30.js" id="app/1-js"></script>

while in previous versions before roots/bud, they were output as

<script src="//localhost:3000/wp-content/themes/sage-652b7ae24ca422d61503483adfb9518d27696b26/public/runtime.a5b3e3.js" id="app/0-js"></script>
<script src="//localhost:3000/wp-content/themes/sage-652b7ae24ca422d61503483adfb9518d27696b26/public/app.c27b30.js" id="app/1-js"></script>

Tested on the laravel mix version of Sage and everything works as it should.

Building without Babel produces empty builds

Description

Building without Babel produces empty builds.

Steps to reproduce

https://github.com/knowler/bud-empty-build-repro

Expected behavior: [What you expect to happen]

That repo should build the code.

Actual behavior: [What actually happens]

It builds an empty file.

Reproduces how often: [What percentage of the time does it reproduce?]

Every time

Versions

You can get this information from referencing CHANGELOG.md. Also, please include the OS and what version of the OS you're running.

  • Bud 4.2.0
  • Node 16.2.0
  • Yarn 1.22.10
  • macOS 11.3.1

Use ESBuild for CSS minification

Summary

esbuild-loader offers stylesheet minification (https://github.com/privatenumber/esbuild-loader#css-assets). Using this to minify CSS assets should be:

  • The default behavior when using @roots/bud-esbuild.
  • Configurable in the @roots/bud-esbuild plugin. This is important in case a user is emitting styles with JS rather than as standalone CSS files (esbuild-loader does not support minification in this scenario).

Motivation

By default @roots/bud uses optimize-css-assets-webpack-plugin to minify styles. ESBuild's minifier is likely faster.

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.