Skip to content

Commit

Permalink
chore: 🤖 update gen esbuild test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
IWANABETHATGUY committed May 11, 2024
1 parent 42207fc commit c267a87
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 11 deletions.
5 changes: 2 additions & 3 deletions crates/rolldown/examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ use sugar_path::SugarPath;
async fn main() {
let root = workspace::crate_dir("rolldown");
let cwd = root.join("./examples").normalize();
dbg!(&cwd);
let mut bundler = Bundler::new(BundlerOptions {
input: Some(vec![
InputItem { name: Some("basic".to_string()), import: "./index.js".to_string() },
// InputItem { name: Some("react".to_string()), import: "react".to_string() },
InputItem { name: Some("react-dom".to_string()), import: "react-dom".to_string() },
InputItem { name: Some("react".to_string()), import: "react".to_string() },
]),
cwd: cwd.into(),
sourcemap: Some(SourceMapType::File),
Expand Down
5 changes: 3 additions & 2 deletions crates/rolldown/examples/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import {a} from './shared'
console.log(`a: `, a)
import { a as a2 } from './shared'
const a = 'index.js'
console.log(a, a2)
4 changes: 2 additions & 2 deletions crates/rolldown/examples/shared.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const a = 'shared.js', b = 1000;
const a = 'shared.js'

export { a, b }
export { a }
2 changes: 1 addition & 1 deletion crates/rolldown_common/src/types/stmt_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ index_vec::define_index_type! {
pub struct StmtInfoId = u32;
}

#[derive(Default, Debug, Clone)]
#[derive(Default, Debug)]
pub struct StmtInfo {
/// The index of this statement in the module body.
///
Expand Down
5 changes: 2 additions & 3 deletions examples/basic-vue/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
function x() { return 1 }
console.log(x())
function x() { return 2 }
import { createApp } from 'vue'

export default createApp({})

0 comments on commit c267a87

Please sign in to comment.