Ionic 3: Rollup Config and SASS Files

In latest Conference App

RollUp config is missing.

If I remove in our App (successfully upgraded to Ionic 3) this part of package.json:

  "config": {
    "ionic_rollup": "./config/rollup.config.js",
    "ionic_sass": "./config/sass.config.js",
    "ionic_copy": "./config/copy.config.js"
  }

I am seeing these errors:

Error
Close
Runtime Error
Can't resolve all parameters for UserService: ([object Object], ?, [object Object], ?).
Stack
Error: Can't resolve all parameters for UserService: ([object Object], ?, [object Object], ?).
    at g (http://localhost:8100/build/polyfills.js:3:7133)
    at syntaxError (http://localhost:8100/build/main.js:114788:34)
    at CompileMetadataResolver._getDependenciesMetadata (http://localhost:8100/build/main.js:127624:35)
    at CompileMetadataResolver._getTypeMetadata (http://localhost:8100/build/main.js:127492:26)
    at CompileMetadataResolver._getInjectableMetadata (http://localhost:8100/build/main.js:127478:21)
    at CompileMetadataResolver.getProviderMetadata (http://localhost:8100/build/main.js:127767:40)
    at http://localhost:8100/build/main.js:127695:49
    at Array.forEach (native)
    at CompileMetadataResolver._getProvidersMetadata (http://localhost:8100/build/main.js:127658:19)
    at CompileMetadataResolver.getNgModuleMetadata (http://localhost:8100/build/main.js:127314:50)
    at JitCompiler._loadModules (http://localhost:8100/build/main.js:138328:64)
    at JitCompiler._compileModuleAndComponents (http://localhost:8100/build/main.js:138287:52)
    at JitCompiler.compileModuleAsync (http://localhost:8100/build/main.js:138249:21)
    at PlatformRef_._bootstrapModuleWithZone (http://localhost:8100/build/main.js:5087:25)
    at PlatformRef_.bootstrapModule (http://localhost:8100/build/main.js:5072:21)
Sass Error
File to import not found or unreadable: /Users/tyrion/devel/saveup-mobile-front/src/theme/variables.scss. Parent style sheet: stdin
stdin
Ionic Framework: 3.0.1
Ionic App Scripts: 1.3.0
Angular Core: 4.0.0
Angular Compiler CLI: 4.0.0
Node: 6.2.2
OS Platform: macOS Sierra
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36

(new error messages in browser are awesome btw…)

I added now the config snippet from ionic-app-scripts github and also updated ionic-app-scripts to lastest version and now get:

File to import not found or unreadable: /Users/tyrion/devel/saveup-mobile-front/src/theme/variables.scss. Parent style sheet: stdin

I have this in now and it works, but I thought Ionic abandoned Rollup, but appscripts still using it with non-working example. Completely confused. Sorry.

    "config": {
        "ionic_rollup": "./config/rollup.config.js",
        "ionic_sass": "./config/sass.config.js",
        "ionic_copy": "./config/copy.config.js",
        "ionic_bundler": "rollup",
        "ionic_source_map_type": "source-map",
        "ionic_cleancss": "./config/cleancss.config.js"
    }

ionic switched pack to webpack a long time ago. so no rollup needed.

The app-scripts are working with multiple bundlers like rollup, webpack, …
But you should try to get everything working with webpack.

Check the https://github.com/driftyco/ionic/blob/master/CHANGELOG.md for breaking changes if you upgrade you project.

Maybe you may want to share some code of your userservice.

Ionic changed the way of theming --> so the a variables.scss is expected for build process but is not found.
https://github.com/driftyco/ionic/blob/master/CHANGELOG.md#steps-to-upgrade-to-rc0 point 14. :wink:

1 Like