Skip to content

Commit

Permalink
fix: map of empty file should have mappings field (#7456)
Browse files Browse the repository at this point in the history
  • Loading branch information
JSerFeng committed Aug 6, 2024
1 parent c772cbb commit 258c050
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ proc-macro2 = { version = "1.0.79" }
quote = { version = "1.0.35" }
rayon = { version = "1.10.0" }
regex = { version = "1.10.4" }
rspack_sources = { version = "=0.2.15" }
rspack_sources = { version = "=0.2.16" }
rustc-hash = { version = "1.1.0" }
schemars = { version = "0.8.16" }
serde = { version = "1.0.197" }
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import './index.css'
console.log('hello')
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = function (code, map) {
expect(map.mappings).toBe('')
return code
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* @type {import('webpack').Configuration | import('@rspack/cli').Configuration}
*/
module.exports = {
mode: "development",
target: 'web',
devtool: "source-map",
module: {
generator: {
'css/auto': {
exportsOnly: false,
}
},
rules: [
{
test: /\.css$/,
use: [
'./loader.js',
'builtin:lightningcss-loader',
],
sideEffects: true,
type: 'css/auto'
}
]
},
experiments: {
css: true
}
};

2 comments on commit 258c050

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Ran ecosystem CI: Open

suite result
modernjs ❌ failure
_selftest ✅ success
nx ❌ failure
rspress ✅ success
rsbuild ❌ failure
examples ✅ success

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Benchmark detail: Open

Name Base (2024-08-06 9347ecc) Current Change
10000_development-mode + exec 2.32 s ± 38 ms 2.32 s ± 24 ms +0.05 %
10000_development-mode_hmr + exec 708 ms ± 18 ms 711 ms ± 8.3 ms +0.43 %
10000_production-mode + exec 2.86 s ± 26 ms 2.86 s ± 36 ms +0.08 %
arco-pro_development-mode + exec 1.86 s ± 68 ms 1.88 s ± 80 ms +1.16 %
arco-pro_development-mode_hmr + exec 434 ms ± 0.91 ms 434 ms ± 3.6 ms +0.04 %
arco-pro_production-mode + exec 3.44 s ± 91 ms 3.43 s ± 83 ms -0.51 %
threejs_development-mode_10x + exec 1.7 s ± 15 ms 1.72 s ± 15 ms +1.32 %
threejs_development-mode_10x_hmr + exec 808 ms ± 9.6 ms 832 ms ± 6.7 ms +2.98 %
threejs_production-mode_10x + exec 5.49 s ± 21 ms 5.52 s ± 31 ms +0.65 %

Please sign in to comment.