@jsenv/plugin-bundling 2.10.10 → 2.10.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +11 -11
- package/src/svg/notes.md +20 -0
package/package.json
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/plugin-bundling",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.11",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"repository": {
|
|
5
6
|
"type": "git",
|
|
6
7
|
"url": "https://github.com/jsenv/core",
|
|
7
8
|
"directory": "packages/related/plugin-bundling"
|
|
8
9
|
},
|
|
9
10
|
"license": "MIT",
|
|
10
|
-
"sideEffects": [
|
|
11
|
-
"./tests/chunks_vendors/snapshots/0_default/jsenv_plugin_bundling_node_modules.js",
|
|
12
|
-
"./tests/chunks_vendors/snapshots/1_vendors/vendors.js"
|
|
13
|
-
],
|
|
14
|
-
"type": "module",
|
|
15
11
|
"exports": {
|
|
16
12
|
".": {
|
|
17
13
|
"import": "./src/main.js"
|
|
@@ -21,9 +17,12 @@
|
|
|
21
17
|
"files": [
|
|
22
18
|
"/src/"
|
|
23
19
|
],
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"@jsenv/core": "*"
|
|
22
|
+
},
|
|
24
23
|
"dependencies": {
|
|
25
24
|
"@jsenv/humanize": "1.7.6",
|
|
26
|
-
"@jsenv/node-esm-resolution": "1.
|
|
25
|
+
"@jsenv/node-esm-resolution": "1.3.0",
|
|
27
26
|
"@jsenv/sourcemap": "1.3.17",
|
|
28
27
|
"@jsenv/url-meta": "8.5.7",
|
|
29
28
|
"@jsenv/urls": "2.9.8",
|
|
@@ -34,10 +33,11 @@
|
|
|
34
33
|
"@jsenv/filesystem": "../../tooling/filesystem",
|
|
35
34
|
"@jsenv/snapshot": "../../tooling/snapshot"
|
|
36
35
|
},
|
|
37
|
-
"peerDependencies": {
|
|
38
|
-
"@jsenv/core": "*"
|
|
39
|
-
},
|
|
40
36
|
"publishConfig": {
|
|
41
37
|
"access": "public"
|
|
42
|
-
}
|
|
38
|
+
},
|
|
39
|
+
"sideEffects": [
|
|
40
|
+
"./tests/chunks_vendors/snapshots/0_default/jsenv_plugin_bundling_node_modules.js",
|
|
41
|
+
"./tests/chunks_vendors/snapshots/1_vendors/vendors.js"
|
|
42
|
+
]
|
|
43
43
|
}
|
package/src/svg/notes.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
JSenv as everything required to be able to bundle svgs during build
|
|
2
|
+
|
|
3
|
+
It could detect svg usages in css and js and transform code
|
|
4
|
+
to make them reference an svg sprite
|
|
5
|
+
|
|
6
|
+
https://github.com/SpiriitLabs/vite-plugin-svg-spritemap/blob/58a41a762db4692bfc273540b99c7339a45d416f/src/core/svgManager.ts#L1
|
|
7
|
+
|
|
8
|
+
Si du code fait ceci:
|
|
9
|
+
|
|
10
|
+
const svgUrl = import.meta.resolve("./file.svg");
|
|
11
|
+
|
|
12
|
+
image.src = svgUrl;
|
|
13
|
+
|
|
14
|
+
Ca devient
|
|
15
|
+
|
|
16
|
+
const svgUrl = "/path/sprite.svg#file";
|
|
17
|
+
image.src = svgUrl;
|
|
18
|
+
|
|
19
|
+
Et si on a un fichier html idéalement on l'embed dedans? Ca c'est si on le dit explicitement avec ?inline
|
|
20
|
+
mais ce seras dans un second temps
|