diff --git a/.yarnrc.yml b/.yarnrc.yml index 4f0f49b98d0..017d8b0c4f0 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -44,9 +44,9 @@ plugins: yarnPath: .yarn/releases/yarn-4.1.0.cjs # Uncomment the following lines if you want to use Verdaccio local npm registry. Read more at packages/README.md -# npmScopes: -# grafana: -# npmRegistryServer: http://localhost:4873 - -# unsafeHttpWhitelist: -# - 'localhost' +#npmScopes: +# grafana: +# npmRegistryServer: http://localhost:4873 +# +#unsafeHttpWhitelist: +# - 'localhost' diff --git a/packages/grafana-icons/.svgrrc.js b/packages/grafana-icons/.svgrrc.cjs similarity index 86% rename from packages/grafana-icons/.svgrrc.js rename to packages/grafana-icons/.svgrrc.cjs index 54882c8e9c3..2c1c29451bf 100644 --- a/packages/grafana-icons/.svgrrc.js +++ b/packages/grafana-icons/.svgrrc.cjs @@ -6,8 +6,8 @@ module.exports = { typescript: true, jsxRuntime: 'automatic', outDir: './src/icons-gen', - template: require('./templates/icon'), - indexTemplate: require('./templates/index'), + template: require('./templates/icon.cjs'), + indexTemplate: require('./templates/index.cjs'), memo: true, svgoConfig: { plugins: [ diff --git a/packages/grafana-icons/package.json b/packages/grafana-icons/package.json index c7f274121cc..163deb36ee4 100644 --- a/packages/grafana-icons/package.json +++ b/packages/grafana-icons/package.json @@ -11,11 +11,11 @@ "url": "https://github.com/grafana/grafana.git", "directory": "packages/grafana-icons" }, + "type": "module", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { "main": "dist/index.js", - "module": "dist/index.js", "types": "dist/index.d.ts", "access": "public" }, @@ -27,7 +27,7 @@ ], "scripts": { "clean": "rimraf ./dist ./compiled ./package.tgz ./src/icons-gen", - "generate": "yarn clean && npx @svgr/cli ./svg && mv ./src/icons-gen/index.ts ./src", + "generate": "yarn clean && npx @svgr/cli ./svg --silent && mv ./src/icons-gen/index.ts ./src", "typecheck": "tsc --emitDeclarationOnly false --noEmit", "lint": "eslint --ext .ts,.tsx ./src", "prettier:check": "prettier --check --list-different=false --log-level=warn \"**/*.{ts,tsx,scss,md,mdx,json}\"", diff --git a/packages/grafana-icons/templates/icon.js b/packages/grafana-icons/templates/icon.cjs similarity index 100% rename from packages/grafana-icons/templates/icon.js rename to packages/grafana-icons/templates/icon.cjs diff --git a/packages/grafana-icons/templates/index.js b/packages/grafana-icons/templates/index.cjs similarity index 100% rename from packages/grafana-icons/templates/index.js rename to packages/grafana-icons/templates/index.cjs