You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are many tools that already fully support. mjs format configuration files, such as babel eslint stylelint prettier, etc. I hope BrowserSync also supports it so that I can maintain a consistent style of configuration file suffix format in the project
Steps to reproduce/test case
When I try to change 'browser sync. js' to' browser sync. mjs'`
node:internal/modules/cjs/loader:1200
throw new ERR_REQUIRE_ESM(filename, true);
^
Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\Administrator\Desktop\bootstrap-admin\src\config\bs-config.mjs not supported.
Instead change the require of C:\Users\Administrator\Desktop\bootstrap-admin\src\config\bs-config.mjs to a dynamic import() which is available in all Co
mmonJS modules.
at Object.default_1 [as default] (C:\Users\Administrator\Desktop\bootstrap-admin\node_modules\.pnpm\[email protected]\node_modules\browser-sync\dis
t\cli\command.start.js:26:26)
at handleCli (C:\Users\Administrator\Desktop\bootstrap-admin\node_modules\.pnpm\[email protected]\node_modules\browser-sync\dist\bin.js:139:25)
at handleIncoming (C:\Users\Administrator\Desktop\bootstrap-admin\node_modules\.pnpm\[email protected]\node_modules\browser-sync\dist\bin.js:191:5)
at runFromCli (C:\Users\Administrator\Desktop\bootstrap-admin\node_modules\.pnpm\[email protected]\node_modules\browser-sync\dist\bin.js:62:16)
at Object.<anonymous> (C:\Users\Administrator\Desktop\bootstrap-admin\node_modules\.pnpm\[email protected]\node_modules\browser-sync\dist\bin.js:28
:5) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v18.20.2
Please specify which version of Browsersync, node and npm you're running
Issue details
There are many tools that already fully support. mjs format configuration files, such as babel eslint stylelint prettier, etc. I hope BrowserSync also supports it so that I can maintain a consistent style of configuration file suffix format in the project
Steps to reproduce/test case
When I try to change 'browser sync. js' to' browser sync. mjs'`
The file content is as follows
运行
browser-sync start --config 'conf/browser-sync.mjs' --port 4000
会得到一个错误Please specify which version of Browsersync, node and npm you're running
Affected platforms
Browsersync use-case
If CLI, please paste the entire command below
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync
none
The text was updated successfully, but these errors were encountered: