File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/rspack/src/config Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,12 @@ const TARGETS: Array<
143
143
const inlineQuery = rest ? rest . trim ( ) : null ;
144
144
const browsers = binding . loadBrowserslist ( inlineQuery , context ) ;
145
145
146
- if ( ! browsers || ( ! inlineQuery && ! hasBrowserslistConfig ( context ) ) ) {
146
+ if (
147
+ ! browsers ||
148
+ ( ! inlineQuery &&
149
+ ! hasBrowserslistConfig ( context ) &&
150
+ ! process . env . BROWSERSLIST )
151
+ ) {
147
152
throw new Error ( `No browserslist config found to handle the 'browserslist' target.
148
153
See https://github.com/browserslist/browserslist#queries for possible ways to provide a config.
149
154
The recommended way is to add a 'browserslist' key to your package.json and list supported browsers (resp. node.js versions).
You can’t perform that action at this time.
0 commit comments