mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-04 03:42:34 +02:00
fix(v2): babel/env should pick correct browserslist config in dev (#1948)
* fix(v2): babel/env should pick correct browserslist config in dev * nits
This commit is contained in:
parent
fc4928f7a6
commit
a54a1dd186
3 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
- Fix babel/env not picking the correct browserslist configuration during development. When running `docusaurus start`, `process.env.NODE_ENV` is now consistently set to `development`.
|
||||
- Ensure routes config generation to be more consistent in ordering. Nested routes should be placed last in routes.js. This will allow user to create `src/pages/docs.js` to create custom docs page for `/docs` or even `src/pages/docs/super.js` to create page for `/docs/super/`;
|
||||
- Fix watcher does not trigger reload on windows.
|
||||
- Add feed for blog posts.
|
||||
|
|
|
@ -48,6 +48,7 @@ export async function build(
|
|||
siteDir: string,
|
||||
cliOptions: Partial<BuildCLIOptions> = {},
|
||||
): Promise<void> {
|
||||
process.env.BABEL_ENV = 'production';
|
||||
process.env.NODE_ENV = 'production';
|
||||
console.log(chalk.blue('Creating an optimized production build...'));
|
||||
|
||||
|
|
|
@ -40,6 +40,8 @@ export async function start(
|
|||
siteDir: string,
|
||||
cliOptions: Partial<StartCLIOptions> = {},
|
||||
): Promise<void> {
|
||||
process.env.NODE_ENV = 'development';
|
||||
process.env.BABEL_ENV = 'development';
|
||||
console.log(chalk.blue('Starting the development server...'));
|
||||
|
||||
// Process all related files as a prop.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue