Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Webpack #37332

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions web/packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ library referenced by other packages.

## Description

| Package | Description |
| ---------- | ----------------------------------------------------------------------- |
| `teleport` | Open-source version of Teleport Web UI |
| `teleterm` | Open-source version of Teleport Connect (Electron app) |
| `build` | Collection of webpack and build scripts used to build Teleport packages |
| `design` | Teleport design system |
| `shared` | Shared code |
| Package | Description |
| ---------- |----------------------------------------------------------------------|
| `teleport` | Open-source version of Teleport Web UI |
| `teleterm` | Open-source version of Teleport Connect (Electron app) |
| `build` | Collection of Vite and build scripts used to build Teleport packages |
| `design` | Teleport design system |
| `shared` | Shared code |
1 change: 0 additions & 1 deletion web/packages/build/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ module.exports = {
expect: true,
jest: true,
},
ignorePatterns: ['**/dist/**'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
Expand Down
50 changes: 1 addition & 49 deletions web/packages/build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,59 +5,11 @@ Gravitational packages. It was created specifically for Gravitational use.

## Content

`devserver` is Gravitational local development server based on the `webpack-dev-server` package.
It works as a proxy to Gravitational clusters where it redirects API requests to the given target
while serving your web assets locally. This proxy knows how to handle CSRF and bearer tokens
embedded in index.html file.

`.eslintrc.js` a set of eslint rules used to validate JS code.

`.babelrc.js` a babel configuration file.

`./webpack` contains webpack configs for dev/production builds.

`./bin` a set of build scripts which get copied to the package `node_modules` folder.

## How to use it

Add `@gravitational/build` to your package.json file.

```
"devDependencies": {
"@gravitational/build": "^1.0.0",
},
```

Create `./src` directory and place `boot.js` file in it which is the default
webpack entry point for Gravitational web applications.

Then you can run

```
$ yarn g-build
```

## Custom webpack config

If you want to use your own `webpack.config.js` file and override the defaults.

For example, if this is your webpack config:

```
const defaultCfg = require('@gravitational/build/webpack/webpack.prod.config');

defaultCfg.entry = {
app: ['./src/myentry.js'],
},

module.exports = defaultCfg;
```

Then you can use `--config` parameter.

```
$ yarn g-build --config webpack.config.js
```
`./vite` contains the Vite configuration & plugins.

## Aliases

Expand Down
32 changes: 0 additions & 32 deletions web/packages/build/bin/g-build.js

This file was deleted.

42 changes: 0 additions & 42 deletions web/packages/build/bin/g-start.js

This file was deleted.

201 changes: 0 additions & 201 deletions web/packages/build/devserver/index.js

This file was deleted.

Loading
Loading