-
-
Notifications
You must be signed in to change notification settings - Fork 587
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
1,440 additions
and
32 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
crates/rspack_binding_options/src/options/raw_builtins/raw_css_extract.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use std::collections::HashMap; | ||
|
||
use napi_derive::napi; | ||
use rspack_plugin_extract_css::plugin::CssExtractOptions; | ||
|
||
#[napi(object)] | ||
pub struct RawCssExtractPluginOption { | ||
pub filename: String, | ||
pub chunk_filename: String, | ||
pub ignore_order: bool, | ||
pub insert: Option<String>, | ||
pub attributes: HashMap<String, String>, | ||
pub link_type: Option<String>, | ||
pub runtime: bool, | ||
} | ||
|
||
impl From<RawCssExtractPluginOption> for CssExtractOptions { | ||
fn from(value: RawCssExtractPluginOption) -> Self { | ||
Self { | ||
filename: value.filename, | ||
chunk_filename: value.chunk_filename, | ||
ignore_order: value.ignore_order, | ||
insert: value.insert, | ||
attributes: value.attributes.into_iter().collect(), | ||
link_type: value.link_type, | ||
runtime: value.runtime, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[package] | ||
edition = "2021" | ||
license = "MIT" | ||
name = "rspack_plugin_extract_css" | ||
repository = "https://github.com/web-infra-dev/rspack" | ||
version = "0.1.0" | ||
|
||
[dependencies] | ||
anyhow = { workspace = true } | ||
async-trait = { workspace = true } | ||
bitflags = { workspace = true } | ||
heck = "0.4.1" | ||
indexmap = { workspace = true } | ||
once_cell = { workspace = true } | ||
rayon = { workspace = true } | ||
regex = { workspace = true } | ||
rkyv = { workspace = true, features = ["indexmap", "validation"] } | ||
rspack_core = { path = "../rspack_core" } | ||
rspack_error = { path = "../rspack_error" } | ||
rspack_hash = { path = "../rspack_hash" } | ||
rspack_identifier = { path = "../rspack_identifier" } | ||
rspack_plugin_runtime = { path = "../rspack_plugin_runtime" } | ||
rustc-hash = { workspace = true } | ||
serde = { workspace = true, features = ["derive"] } | ||
serde_json = { workspace = true } | ||
sugar_path = { workspace = true } | ||
swc_core = { workspace = true, features = [ | ||
"css_ast", | ||
"css_codegen", | ||
"css_parser", | ||
"css_utils", | ||
"css_visit", | ||
"css_visit_path", | ||
"css_compat", | ||
"css_modules", | ||
"css_prefixer", | ||
"css_minifier", | ||
] } | ||
tokio = { workspace = true } | ||
tracing = { workspace = true } | ||
urlencoding = "2.1.2" | ||
ustr = { workspace = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022-present Bytedance, Inc. and its affiliates. | ||
|
||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.