webpack-contrib/cache-loader

Module build failed: TypeError: Cannot read property 'async' of undefined at react-app-dashboard/node_modules/babel-loader/lib/index.js:50:27

jabir-hussain opened this issue · 1 comments

Uing nwb for creating library, so here I want to use webpack and babel for some additional packaging functionality.

//package.json
{
"name": "react-app-dashboard",
"version": "1.0.0",
"description": "Describe react-app-dashboard here",
"private": true,
"scripts": {
"build": "nwb build-react-app",
"clean": "nwb clean-app",
"start": "nwb serve-react-app",
"test": "nwb test-react",
"test:coverage": "nwb test-react --coverage",
"test:watch": "nwb test-react --server"
},
"dependencies": {
"@babel/core": "^7.2.2",
"react": "^16.7.0",
"react-dom": "^16.7.0"
},
"devDependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^8.0.4",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"cache-loader": "^1.2.2",
"webpack": "^4.28.3"
},
"author": "",
"license": "MIT",
"repository": ""
}

// nwb.config.js

module.exports = {
type: 'react-app',
babel: {
cherryPick: 'some-module',
plugins: ["babel-loader", "babel-preset-env", "babel-preset-react"]
},
webpack: {
publicPath: '',
extra: {
entry: './src/index.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist')
}
}
},
}

It looks like you just deleted our lovely crafted issue template. It was there for good reasons. Please help us solving your issue by answering the questions asked in this template. I'm closing this. Please either update the issue with the template and reopen, or open a new issue.