mirror of
https://github.com/penpot/penpot-plugins.git
synced 2025-01-21 06:02:34 -05:00
fix: prevent server crash in the dev server
This commit is contained in:
parent
efca5d4d1a
commit
49defa6c2b
6 changed files with 11 additions and 9 deletions
|
@ -46,18 +46,18 @@ At this point, you have 2 choices:
|
|||
|
||||
```
|
||||
// for the example plugin
|
||||
npm run start
|
||||
npm run start:example
|
||||
|
||||
or
|
||||
|
||||
npx nx run example-plugin:serve-static --port 4201
|
||||
npx nx run example-plugin:build --watch & npx nx run example-plugin:preview
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
// for the contrast plugin
|
||||
npx nx run contrast-plugin:serve-static --port 4210
|
||||
npx nx run contrast-plugin:build --watch & npx nx run contrast-plugin:preview
|
||||
```
|
||||
|
||||
Open in your browser: `http://localhost:4210/`
|
||||
|
|
|
@ -13,7 +13,7 @@ export default defineConfig({
|
|||
},
|
||||
|
||||
preview: {
|
||||
port: 4300,
|
||||
port: 4210,
|
||||
host: 'localhost',
|
||||
},
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ export default defineConfig({
|
|||
},
|
||||
|
||||
preview: {
|
||||
port: 4300,
|
||||
port: 4201,
|
||||
host: 'localhost',
|
||||
},
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ Add to `tsconfig.app.json`
|
|||
Then, run the static server
|
||||
|
||||
```
|
||||
npx nx run example-plugin:serve-static --port 4201
|
||||
npx nx run example-plugin:build --watch & npx nx run example-plugin:preview
|
||||
```
|
||||
|
||||
Finally, go to penpot and load the plugin. Run the command in the console devtools from your browser.
|
||||
|
|
|
@ -45,7 +45,9 @@ export default defineConfig({
|
|||
},
|
||||
sourcemap: true,
|
||||
},
|
||||
|
||||
preview: {
|
||||
port: 4200,
|
||||
},
|
||||
test: {
|
||||
globals: true,
|
||||
cache: {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"version": "0.0.0",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "npx nx run plugins-runtime:serve-static --port 4200",
|
||||
"start:example": "npx nx run example-plugin:serve-static --port 4201",
|
||||
"start": "npx nx run plugins-runtime:build --watch & npx nx run plugins-runtime:preview",
|
||||
"start:example": "npx nx run example-plugin:build --watch & npx nx run example-plugin:preview",
|
||||
"start:rpc-api": "npx nx serve rpc-api",
|
||||
"start:styles-example": "npx nx run example-styles:serve --port 4202",
|
||||
"build": "npx nx build plugins-runtime --emptyOutDir=true",
|
||||
|
|
Loading…
Add table
Reference in a new issue