We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
更新方式 https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
Packages
create-koot-app
koot
koot-webpack
koot-cli
koot-electron
koot-qiankun
根层代码库
camelcase
chalk
inquirer
execa
is-port-reachable
ora
os-locale
latest-version
npm-email
package-json
判断项目类型决定,如果是 ESM 添加
output: { chunkFormat: 'module', chunkLoading: 'import', }
package.json
{ "type": "module" }
正则替换
^[a-zA-Z]+[ ]*(.+?)[ ]*=[ ]*require\((.+?)\) -> import $1 from $2
^[a-zA-Z]+[ ]*(.+?)[ ]*=[ ]*require\((.+?)\)
import $1 from $2
其他问题
import { dirname } from 'path'; import { fileURLToPath } from 'url'; export default () => dirname(fileURLToPath(import.meta.url));
__filename
The text was updated successfully, but these errors were encountered:
some notes
import(fileUrl).then(mod => mod.default) import { glob, globSync } from 'glob' import { osLocale } from 'os-locale' import { createRequire } from 'module'; const require = createRequire(import.meta.url);
Sorry, something went wrong.
No branches or pull requests
更新方式 https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
Packages
create-koot-app
koot
koot-webpack
koot-cli
koot-electron
koot-qiankun
根层代码库
camelcase
v7chalk
v5inquirer
v9koot
chalk
v5execa
v6inquirer
v9is-port-reachable
v4ora
v6os-locale
v6koot-cli
chalk
v5latest-version
v7npm-email
v4ora
v6os-locale
v6package-json
v8判断项目类型决定,如果是 ESM 添加
package.json
正则替换
^[a-zA-Z]+[ ]*(.+?)[ ]*=[ ]*require\((.+?)\)
->import $1 from $2
其他问题
__filename
The text was updated successfully, but these errors were encountered: