million
are you using?@million/lint@latest
None
yarn
Mac
Chrome
Running npx @million/lint@latest in gatsby project. I have my Gatsby config files as ts.
After choosing the framework as Gatsby, instead of editing existing gatsby-node.ts file. it just created fresh gatsby-node.js with onCreateWebpackConfig hook.
PS: I already have million/compiler setup in gatsby-node.ts. In this case, should I use both?
import million from 'million/compiler'
import { webpack } from '@million/lint';
export const onCreateWebpackConfig: GatsbyNode['onCreateWebpackConfig'] =
function onCreateWebpackConfig({ actions }): void {
actions.setWebpackConfig({
plugins: [webpack(), million.webpack({ mode: 'react', server: true, auto: true })],
})
}
Thank you for your great work and project!
It should edit existing ts file and editing existing onCreateWebpackConfig function, instead of creating js file.
sorry
Update: getting an error while running gatsby dev:
β‘ Million Lint v0.0.58
β Ready in 0.64ms
β‘ Million.js 3.0.3
- Tip: use // million-ignore for errors
- Hotline: https://million.dev/hotline
β‘ <Html> now renders ~50% faster
β‘ <Unverified> now renders ~33% faster
β‘ <ProfileIncomplete> now renders ~40% faster
π Million Wrapped: https://million.dev/wrapped/36c5af2124fc2496ce68d8689f14b313
β‘ <DropdownOption> now renders ~83% faster
β‘ <ListBox> now renders ~67% faster
ERROR UNKNOWN
There was an error compiling the html.js component for the development server.
See our docs page on debugging HTML builds for help https://gatsby.dev/debug-html ReferenceError:
navigator is not defined
1 | import { useEffect, useState } from "react";
> 2 | var isInputPendingSupported = "scheduling" in navigator &&
| ^
3 | navigator.scheduling &&
4 | "isInputPending" in navigator.scheduling;
5 | var tasks = [];
WebpackError: ReferenceError: navigator is not defined
commenting out webpack() fixes an issue.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too