nwb icon indicating copy to clipboard operation
nwb copied to clipboard

Module build failed: TypeError: Cannot read property 'async' of undefined

Open jabir-hussain opened this issue 5 years ago • 0 comments

Uing nwb for creating library, so here I want to use webpack and babel for some additional packaging functionality. //Issue occurred in babel-loader ./react-app-dashboard/node_modules/babel-loader/lib/index.js:50:27

//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') } } }, }

jabir-hussain avatar Jan 02 '19 04:01 jabir-hussain