Code Monkey home page Code Monkey logo

example-pawjs-ant-design's People

Contributors

at-zeel avatar athiteshkubavat avatar tirthbodawala avatar yash-thakur avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

example-pawjs-ant-design's Issues

Uncaught TypeError: webpackHandler.getBabelCssRule is not a function

hi guys, i got this error when i try to run fresh installation, please anyone can help me?

webpack.js:48 Uncaught TypeError: webpackHandler.getBabelCssRule is not a function
    at PawImageOptimizerWebpack.apply (webpack.js:48)
    at ClientHandler.addPlugin (handler.js:259)
    at new Client (client.js:47)
    at Module.eval (app.js:34)
    at eval (app.js:75)
    at Module../node_modules/@pawjs/pawjs/src/client/app.js (2a1f20cc5ca1611199e6.js:118)
    at __webpack_require__ (07e05f344e40c25a1c0a.js:791)
    at fn (07e05f344e40c25a1c0a.js:151)
    at Module.eval (hot-app.js:6)
    at eval (hot-app.js:49)

here is my client.js file

import LessPlugin from '@pawjs/less/webpack';

import ReduxClient from '@pawjs/redux/client';
import * as AppReducers from './reducers';

const appInitialState = {};

export default class Client {
  constructor({ addPlugin }) {
    const reduxClient = new ReduxClient({ addPlugin });
    
    reduxClient.setReducers(AppReducers);
    
    addPlugin(reduxClient);
    addPlugin(new LessPlugin);
  }
apply(clientHandler) {
    clientHandler.hooks.reduxInitialState.tapPromise('ReduxInitialState', async ({getInitialState, setInitialState}) => {
      const initialState = Object.assign({}, getInitialState(), appInitialState);
      setInitialState(initialState);
    })

    clientHandler.hooks.locationChange.tapPromise('ReloadAds', async () => this.advertise());
    clientHandler.hooks.locationChange.tapPromise('ReloadGoogleTrack', async () => Client.googleTrack());
    clientHandler.hooks.renderComplete.tap('ReloadAds', async () => this.advertise());
  }
}

here is my webpack.js

import SrcsetPlugin from '@pawjs/srcset/webpack';
import ImageOptimizer from '@pawjs/image-optimizer/webpack';

export default class ProjectWebpack {
  constructor({ addPlugin }) {
    // Add sass compiler to the project
    const optimizerOptions = {
      supportedEnv: [
        'production',
      ],
      configLabel: 'MEDIUM_QUALITY',
    };
    addPlugin(new ImageOptimizer(optimizerOptions));

    addPlugin(new SrcsetPlugin());
    const options = {
      javascriptEnabled: true,
    };
    addPlugin(new LessPlugin(options));
  }
}

and here is my package.json

"dependencies": {
    "@pawjs/image-optimizer": "^2.2.2",
    "@pawjs/pawjs": "^3.0.0-alpha.14",
    "@pawjs/srcset": "^2.1.1",
    "@types/react": "^16.8.19",
    "@types/react-dom": "^16.8.4",
    "antd": "^3.24.2",
    "bulma": "^0.7.5",
    "cloudinary": "^1.14.0",
    "eslint-import-resolver-webpack": "^0.11.1",
    "fork-ts-checker-webpack-plugin": "^1.3.5",
    "prop-types": "^15.7.2",
    "redux-saga": "^1.1.1",
    "snyk": "^1.173.1",
    "universal-fetch": "^1.0.0"
  },
  "snyk": true,
  "devDependencies": {
    "@pawjs/less": "^2.1.1",
    "@pawjs/redux": "^2.2.0",
    "@pawjs/sass": "^2.2.1",
    "react-redux": "^7.1.1",
    "redux": "^4.0.4",
    "webpack-bundle-analyzer": "^3.3.2"
  }

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.