I am using these instructions to configure webpack for Handsontable Pro to work with my CRA. I came across your package, attempted to implement it like this:
module.exports = function override(config, env) {
//do stuff with the webpack config...
resolve: {
alias: {
handsontable: path.resolve(__dirname, 'node_modules/handsontable-pro')
}
}
return config;
}
Here is the error I get:
````
/Users/avremel/Desktop/grid-sample/config-overrides.js:5
handsontable: path.resolve(__dirname, 'node_modules/handsontable-pro')
^
ReferenceError: path is not defined
at override (/Users/avremel/Desktop/grid-sample/config-overrides.js:5:21)
at Object.
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:504:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: react-app-rewired start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/avremel/.npm/_logs/2017-09-13T15_46_43_280Z-debug.log
````
Help would be appreciated.
const path = require('path') at the top
Most helpful comment
const path = require('path')at the top