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)
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());
}
}
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));
}
}
"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"
}