Set the main entry point for the application. If the option is not set, Neutrino defaults it to `index.js`.
If a relative path is specified, it will be resolved relative to `options.source`; absolute paths will be used as-is.
Set the main entry point for the application. If the option is not set, Neutrino defaults it to `index.*` - the extension is resolved by Webpack. The main file by default is not required to be in JavaScript format. If a relative path is specified, it will be resolved relative to `options.source`; absolute paths will be used as-is.
```js
Neutrino({
// if not specified, defaults to options.source + index.js
// if not specified, defaults to options.source + index
// relative, resolves to options.source + ./entry.js
Set the main entry point for the application. If the option is not set, Neutrino defaults it to `index.js`.
If a relative path is specified, it will be resolved relative to `options.source`; absolute paths will be used as-is.
Set the main entry point for the application. If the option is not set, Neutrino defaults it to `index.*` - the extension is resolved by Webpack. If a relative path is specified, it will be resolved relative to `options.source`; absolute paths will be used as-is.
The main file by default is not required to be in JavaScript format. It also potentially may be JSX, TypeScript or any other preprocessor language. These extensions should be specified in a preset in `neutrino.config.resolve.extensions`.
```js
module.exports = neutrino => {
// if not specified, defaults to options.source + index.js
// if not specified, defaults to options.source + index
neutrino.options.entry;
// relative, resolves to options.source + ./entry.js
Set the main entry point for the application. If the option is not set, Neutrino defaults it to `index.js`.
If a relative path is specified, it will be resolved relative to `options.source`; absolute paths will be used as-is.
Set the main entry point for the application. If the option is not set, Neutrino defaults it to `index.*` - the extension is resolved by Webpack. If a relative path is specified, it will be resolved relative to `options.source`; absolute paths will be used as-is.
The main file by default is not required to be in JavaScript format. It also potentially may be JSX, TypeScript or any other preprocessor language. These extensions should be specified in a preset in `neutrino.config.resolve.extensions`.
```js
module.exports = neutrino => {
// if not specified, defaults to options.source + index.js
// if not specified, defaults to options.source + index
neutrino.options.entry;
// relative, resolves to options.source + ./entry.js
@ -122,14 +122,15 @@ If a relative path is specified, it will be resolved relative to `options.root`;
### `options.entry`
Set the main entry point for the application. If the option is not set, Neutrino defaults it to `index.js`.
If a relative path is specified, it will be resolved relative to `options.source`; absolute paths will be used as-is.
Set the main entry point for the application. If the option is not set, Neutrino defaults it to `index.*` - the extension is resolved by Webpack. If a relative path is specified, it will be resolved relative to `options.source`; absolute paths will be used as-is.
The main file by default is not required to be in JavaScript format. It also potentially may be JSX, TypeScript or any other preprocessor language. These extensions should be specified in a preset in `neutrino.config.resolve.extensions`.
```js
{
"neutrino": {
"options": {
// if not specified, defaults to options.source + index.js
// if not specified, defaults to options.source + index
// relative, resolves to options.source + ./entry.js
@ -166,10 +166,7 @@ To override the build configuration, start with the documentation on [customizat
`neutrino-preset-web` creates some conventions to make overriding the configuration easier once you are ready to make
changes.
By default the Web preset creates a single **main**`index` entry point to your application, and this maps to the
`index.js` file in the `src` directory. This value is provided by `neutrino.options.entry`.
This means that the Web preset is optimized toward the use case of single-page applications over multi-page
applications.
By default the Web preset creates a single **main**`index` entry point to your application, and this maps to the `index.*` file in the `src` directory. The extension is resolved by Webpack. This value is provided by `neutrino.options.entry`. This means that the Web preset is optimized toward the use case of single-page applications over multi-page applications.