Unverified Commit a796cedf authored by Donny/강동윤's avatar Donny/강동윤 Committed by GitHub

Disable loading of `.swcrc` (#30384)


We found that `.swcrc` was unintentionally loaded breaking applications as it is not tested for that yet, customization will be added at a later point in time



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
parent 8e405543
...@@ -122,7 +122,8 @@ where ...@@ -122,7 +122,8 @@ where
let s = cx.get::<JsString>(0)?.into_utf8()?; let s = cx.get::<JsString>(0)?.into_utf8()?;
let is_module = cx.get::<JsBoolean>(1)?; let is_module = cx.get::<JsBoolean>(1)?;
let options: TransformOptions = cx.get_deserialized(2)?; let mut options: TransformOptions = cx.get_deserialized(2)?;
options.swc.swcrc = false;
let output = try_with_handler(c.cm.clone(), true, |handler| { let output = try_with_handler(c.cm.clone(), true, |handler| {
c.run(|| { c.run(|| {
...@@ -144,7 +145,9 @@ where ...@@ -144,7 +145,9 @@ where
#[js_function(4)] #[js_function(4)]
pub fn transform(cx: CallContext) -> napi::Result<JsObject> { pub fn transform(cx: CallContext) -> napi::Result<JsObject> {
schedule_transform(cx, |c, src, _, options| { schedule_transform(cx, |c, src, _, mut options| {
options.swc.swcrc = false;
let input = Input::Source(c.cm.new_source_file( let input = Input::Source(c.cm.new_source_file(
if options.swc.filename.is_empty() { if options.swc.filename.is_empty() {
FileName::Anon FileName::Anon
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment