sysgears / create-apollo-app

Create Apollo App is a command-line tool designed to generate fully-configured starter Apollo GraphQL projects with essential dependencies for developing web, server and mobile applications and zero build configuration.
https://apolloapp.org
MIT License
119 stars 11 forks source link

Problem with lack of extra option support for CSS/LESS loaders #47

Closed fguitton closed 6 years ago

fguitton commented 6 years ago

SpinJS does not allow the addition of extra option (similar to babelConfig/webpackConfig) for CSS/LESS loaders leading to the following error when we bump the version of the less package to 3.0.0 :

ERROR in /mnt/c/Repos/apollo-universal-starter-kit/node_modules/css-loader??ref--7-1!/mnt/c/Repos/apollo-universal-starter-kit/node_modules/postcss-loader/lib??ref--7-2!/mnt/c/Repos/apollo-universal-starter-kit/node_modules/less-loader/dist/cjs.js??ref--7-3!../client/src/modules/common/styles/styles.less
Module build failed:

// https://github.com/ant-design/ant-motion/issues/44
.bezierEasingMixin();
^
Inline JavaScript is not enabled. Is it set in your options?
      in /mnt/c/Repos/apollo-universal-starter-kit/node_modules/antd/lib/style/color/bezierEasing.less (line 110, column 0)
 @ ../client/src/modules/common/styles/styles.less 2:18-239 19:6-27:8 20:18-239
 @ ../client/src/modules/common/index.jsx
 @ ./src/middleware/html.jsx
 @ ./src/middleware/website.jsx
 @ ./src/app.js
 @ ./src/server.js
 @ ./src/index.ts
 @ multi raf/polyfill babel-polyfill webpack/hot/signal.js ./src/index.ts

It does not seem to be addressable by use of webConfig to merge with the final webpack configuration since the loader configurations are in anonymous arrays/objects.

larixer commented 6 years ago

@fguitton The PR has been started to implement loader configs overriding:

48

If you have free time, please consider helping with implementation

larixer commented 6 years ago

@fguitton Implemented in #48 and published asspinjs@0.4.116, use cssConfig builder option to override generated css-loader options.