Closed lucasconstantino closed 7 years ago
About Webpack failing in the build, I guess the CI is not installing devDependencies, is that rigth? It sure should for tests to work.
Ref: https://webpack.github.io/docs/library-and-externals.html
@lucasconstantino the tests were failing since Babel's commands are separated in another module called babel-cli
, adding the package to the devDependencies should work.
The change from Webpack to Babel made redux-boot dependent from babel-runtime
module:
$ node index.js
module.js:341
throw err;
^
Error: Cannot find module 'babel-runtime/regenerator'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/Users/sebas/Virtual/projects/sebas-redux-boot/lib/bootstrap.js:8:20)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
Maybe if we configure the Webpack to avoid the node_modules should do the trick, plus the peerDependencies change at the package.json file.
We could use Webpack Externals to create the lib/index.js
bundle, or something like that.
What do you think?
[EDIT] Actually, I tested with webpack-node-externals and even so, the babe-runtime is always a dependency.
@lucasconstantino thanks! moving everything to peerDependency was really needed.
Could you explain what are the benefits of that approach to build the dist bundle?
The build is failing since it couldn't find the webpack module in order to execute the build script, I'm going to analyze more about that and see if I can fix it.