GithubHelp home page GithubHelp logo

postcss-px-to-viewport's People

Contributors

xianzhengquan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

postcss-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之后倒是能解决这个问题, 但用起来感觉还是有些不太方便, 大佬看看方不方便解决一下呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.