postcss-px-to-viewport's People
Forkers
miusuncle yolinsoft jayazhang 313224646 biezhenyu liujiaweb zfxj sujiewen lijiahao8898 jxlustpostcss-px-to-viewport's Issues
[Error] Loading PostCSS Plugin failed: Cannot find module 'object-assign'
win10
node v16.17.0
yarn v1.22.18
package.json
:
{
"name": "vue-project",
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview --port 4173",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
},
"dependencies": {
"vant": "^3.5.4",
"vue": "^3.2.37",
"vue-router": "^4.1.3"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.1.4",
"@vitejs/plugin-vue": "^3.0.1",
"@vue/eslint-config-prettier": "^7.0.0",
"@xianzhengquan/postcss-px-2-vw": "^0.0.1",
"eslint": "^8.21.0",
"eslint-plugin-vue": "^9.3.0",
"prettier": "^2.7.1",
"unplugin-vue-components": "^0.22.4",
"vite": "^3.0.4"
},
"peerDependencies": {
"postcss": "^8.4.16"
}
}
postcss.config.js
:
//https://github.com/evrone/postcss-px-to-viewport
//https://github.com/evrone/postcss-px-to-viewport/issues/83
module.exports = {
plugins: {
'@xianzhengquan/postcss-px-2-vw': {
viewportWidth: 750
}
}
};
启动之后, 刷新页面, 报错:
Failed to load PostCSS config (searchPath: xxx): [Error] Loading PostCSS Plugin failed: Cannot find module 'object-assign'
Require stack:
- xxx\node_modules\@xianzhengquan\postcss-px-2-vw\index.js
- xxx\postcss.config.js
然后安装object-assign
之后倒是能解决这个问题, 但用起来感觉还是有些不太方便, 大佬看看方不方便解决一下呢?
请贴一下你的postcss.config.js配置文件
can not work in vite2.x?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.