Maybe I am not understanding something, but trying to use both netlify dev and netlify build - seems netlify dev wants me to use netlify.toml configuration file. This is my file
[build]
# folder to publish with static content
# since we have a "simple" static site, we can directly publish "src" folder
publish = "src"
[[plugins]]
name = "Cypress"
type = "netlify-plugin-cypress"
[config]
# if we are running the example site locally
# then it will be at local port
baseUrl = 'http://localhost:8080'
But the plugin name is not resolved correctly
$ netlify build --dry
โฏ Loading plugins
Loading plugin "0" from netlify-plugin-cypress
Loading plugin "@netlify/functions" from build core
โโโโโโโโโโโโโโโโโโโโโโโ
โ 1. functionsBuild โ โ Plugin @netlify/functions in build core
โโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโ
โ 2. postBuild โ Plugin 0 netlify-plugin-cypress
โโโโโโโโโโโโโโโโโโโโโโโ
which is weird
Hi @bahmutov,
The netlify.toml has some TOML syntax errors. The netlify.toml should be:
[build]
# folder to publish with static content
# since we have a "simple" static site, we can directly publish "src" folder
publish = "src"
[plugins.Cypress]
type = "netlify-plugin-cypress"
[plugins.Cypress.config]
# if we are running the example site locally
# then it will be at local port
baseUrl = 'http://localhost:8080'
which is the same as the following YAML:
build:
publish: src
plugins:
Cypress:
type: netlify-plugin-cypress
config:
baseUrl: http://localhost:8080
Does the file work?
We recommend using YAML as TOML can be confusing.
We will add some validation for the configuration file (#38) which should help you fix those errors better in the future.
Plugin formats have been updated to an array like so:
build:
publish: src
plugins:
- type: netlify-plugin-cypress
config:
baseUrl: http://localhost:8080
And in toml it looks like
[build]
publish = "src"
[[plugins]]
type = "netlify-plugin-cypress"
[plugins.config]
baseUrl = "http://localhost:8080"
Closing this issue. Feel free to re-open if you have more issues/questions on the syntax
Most helpful comment
Plugin formats have been updated to an array like so:
And in toml it looks like