@imtf/profile-scripts 1.0.6 → 1.0.7

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/changelog.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Here you can find a resume of all changes between versions.
4
4
 
5
+ ## 1.0.7
6
+
7
+ ### Features
8
+
9
+ - Use svgo to dedupe svgs ids and other optimizations
10
+
5
11
  ## 1.0.6
6
12
 
7
13
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imtf/profile-scripts",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Default scripts to bundle & transpile imtf front-end plugins",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -26,7 +26,9 @@
26
26
  "private": false,
27
27
  "dependencies": {
28
28
  "@svgr/core": "^6.2.0",
29
- "concurrently": "^6.2.1",
29
+ "@svgr/plugin-jsx": "^6.2.0",
30
+ "@svgr/plugin-svgo": "^6.2.0",
31
+ "concurrently": "^7.0.0",
30
32
  "esbuild": "^0.14.8",
31
33
  "esbuild-plugin-external-global": "^1.0.1",
32
34
  "serve": "^13.0.2"
@@ -8,7 +8,8 @@ const { watch } = minimist(process.argv.slice(2))
8
8
 
9
9
  build({
10
10
  entryPoints: ['src/index.js'],
11
- outfile: 'build/index.js',
11
+ // outfile: 'build/index.js',
12
+ outdir: 'build',
12
13
  platform: 'browser',
13
14
  bundle: true,
14
15
  target: 'es6',
@@ -26,9 +26,13 @@ const svgPlugin = (options = {}) => ({
26
26
  // Otherwise it's a react component
27
27
  const contents = await transform(
28
28
  svg,
29
- { ...options },
29
+ {
30
+ plugins: ['@svgr/plugin-svgo', '@svgr/plugin-jsx'],
31
+ ...options,
32
+ },
30
33
  { filePath: args.path }
31
34
  )
35
+
32
36
  return {
33
37
  contents,
34
38
  loader: 'jsx',