1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/packages/infrastructure/webpack
dependabot[bot] 1e6c859539
Bump tailwindcss from 3.2.7 to 3.3.1 (#7458)
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.2.7 to 3.3.1.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.2.7...v3.3.1)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-04 08:14:55 -04:00
..
src Webpack config fixes (#7423) 2023-04-04 09:36:02 +03:00
index.js Add package for sharing webpack configurations for upcoming Features (#7199) 2023-02-22 12:28:07 +02:00
jest.config.js Add package for sharing webpack configurations for upcoming Features (#7199) 2023-02-22 12:28:07 +02:00
package.json Bump tailwindcss from 3.2.7 to 3.3.1 (#7458) 2023-04-04 08:14:55 -04:00
README.md Add package for sharing webpack configurations for upcoming Features (#7199) 2023-02-22 12:28:07 +02:00

@k8slens/webpack

This package contains webpack configurations for Lens packages.

Install

$ npm install @k8slens/webpack

Features

Configurations

Node package

This configuration should be used when creating package that will be executed within Node environment.

webpack.config.js

module.exports = require("@k8slens/webpack").configForNode;

React package

This configuration should be used when creating package tha will be executed within Browser environment.

webpack.config.js

module.exports = require("@k8slens/webpack").configForReact;

Multi export package

This configuration should be used when package contains multiple entrypoint e.g. for different environments. You need to add lensMultiExportConfig to package.json with configuration. Note that also exports property needs to be set, but the correct values are generated from lensMultiExportConfig when using lens-build -script.

webpack.config.js

const packageJson = require("./package.json");

module.exports = require("@k8slens/webpack").getMultiExportConfig(packageJson);

package.json

{
  "lensMultiExportConfig": {
    "./main": {
      "buildType": "node",
      "entrypoint": "./src/main/index.ts"
    },
    "./renderer": {
      "buildType": "react",
      "entrypoint": "./src/renderer/index.ts"
    }
  },

  "exports": {
    "./main": {
      "types": "./dist/main/index.d.ts",
      "require": "./dist/main/index.js",
      "import": "./dist/main/index.js",
      "default": "./dist/main/index.js"
    },
    "./renderer": {
      "types": "./dist/renderer/index.d.ts",
      "require": "./dist/renderer/index.js",
      "import": "./dist/renderer/index.js",
      "default": "./dist/renderer/index.js"
    }
  }
}

Scripts

  1. lens-build which builds the packages
  2. lens-remove-build which removes the build directory from packages. It's useful for cleaning up.