liuly

Results 16 comments of liuly

One workaround for vim is config tmp file path or disable them in `.vimrc` file, for example: ```vimrc set backupdir=/tmp,. set directory=/tmp,. ``` I'm not sure if #3224 is intended...

If you are using npm: ```json "overrides": { "nuxt": { "rollup": "npm:@rollup/wasm-node@latest" } } ``` You can try to first remove `package-lock.json`, `node_modules`, then `npm install` and `npm build` again....

As the arguments `compare(0, 0 + 7)` here are all known at compile time, we can optimize some code inside function away. If the arguments here are unknown, for example...

You need [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/master/packages/commonjs). If you want to use both `include` and `require` statement in the same file, set [transformMixedEsModules](https://github.com/rollup/plugins/tree/master/packages/commonjs/#transformmixedesmodules) to `true`. Example rollup config file: ```js import commonjs from '@rollup/plugin-commonjs';...

> @liuly0322 Have tried but still it wouldn't bundle modules imported by require statement Check the [config file usage](https://rollupjs.org/tutorial/#using-config-files), are you using `-c` option (for example `npx rollup -c` or...

Well, you need to set `treeshake.unknownGlobalSideEffects`, see [repl](https://rollupjs.org/repl/?version=4.16.1&shareable=JTdCJTIyZXhhbXBsZSUyMiUzQW51bGwlMkMlMjJtb2R1bGVzJTIyJTNBJTVCJTdCJTIyY29kZSUyMiUzQSUyMkFnZ3JlZ2F0ZUVycm9yJTNCJTVDbldlYWtSZWYlM0IlNUNuRmluYWxpemF0aW9uUmVnaXN0cnklM0IlMjIlMkMlMjJpc0VudHJ5JTIyJTNBdHJ1ZSUyQyUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTdEJTVEJTJDJTIyb3B0aW9ucyUyMiUzQSU3QiUyMm91dHB1dCUyMiUzQSU3QiUyMmZvcm1hdCUyMiUzQSUyMmNqcyUyMiU3RCUyQyUyMnRyZWVzaGFrZSUyMiUzQSU3QiUyMnVua25vd25HbG9iYWxTaWRlRWZmZWN0cyUyMiUzQWZhbHNlJTdEJTdEJTdE), you can toggle this option. Refer to the [doc](https://rollupjs.org/configuration-options/#treeshake-unknownglobalsideeffects) for why this happens.