Closed ljquan closed 3 years ago
Use CommonJS in postcss.config.js
?
// eslint-disable-next-line @typescript-eslint/no-var-requires
const px2remOptions = require("postcss-px2rem-options"); // or eslintignore
module.exports = () => ({
plugins: [
px2remOptions([
{
remUnit: 20,
include: /src/i
}
])
]
});
Even deleting postcss.config.js
is the same
Could you try to delete yarn.lock
, package-lock.json
, node_module
, and reinstall the dependencies only with npm
oryarn
? maybe related to an optional dep fork-ts-checker-webpack-plugin-v5
which depends on cosmiconfig@^6.0.0
cosmiconfigSync
is provided by cosmiconfig@^6.0.0
, I can't find it in your package-lock.json,
I found that vue create
a project with yarn, then npm i postcss-px2rem-options
will cause some problems.(some files in node_modules are missing). Don't use both npm and yarn in project.
Version
4.5.8
Reproduction link
https://github.com/ljquan/vue3.git
Environment info
Steps to reproduce
What is expected?
can run
What is actually happening?
break