[Bug?] Importing ionic.theme.default breaks webpack sass-loader


#1

Hi, i have a webpack build process and the webpack theme that came with Ionic RC.0 breaks the process in the sass-loader with the following error:

22% building modules 1/2 modules 1 active .../taoappionic2/src/theme/app.core.scssTypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.relative (path.js:1228:5)
    at Object.onRender (/home/carlos/Carlos/OSGroup/taoappionic2/node_modules/sass-loader/index.js:282:42)
    at Object.<anonymous> (/home/carlos/Carlos/OSGroup/taoappionic2/node_modules/sass-loader/node_modules/async/dist/async.js:2414:31)
    at apply (/home/carlos/Carlos/OSGroup/taoappionic2/node_modules/sass-loader/node_modules/async/dist/async.js:40:25)
    at Object.<anonymous> (/home/carlos/Carlos/OSGroup/taoappionic2/node_modules/sass-loader/node_modules/async/dist/async.js:76:12)
    at Object.callback (/home/carlos/Carlos/OSGroup/taoappionic2/node_modules/sass-loader/node_modules/async/dist/async.js:988:16)
    at options.success (/home/carlos/Carlos/OSGroup/taoappionic2/node_modules/node-sass/lib/index.js:309:32)

Any idea why? here’s the loader config:

  {
    test: /\.scss$/,
    loaders: [
      'style-loader',
      'css-loader',
      'resolve-url-loader',
      'sass-loader' +
      '?sourceMap&' +
      'context=/&' +
      'outputStyle=expanded&' +
      'root=' + helpers.root('src') + '&' +
      '&includePaths[]' + helpers.root('node_modules') + '&' +
      '&includePaths[]' + helpers.root('src')
    ],
    include: /app.core.scss/
  },

I’ve tried with this in the plugins as stated in webpack 2 beta.23+:

new LoaderOptionsPlugin({
  options: {
    sassLoader: {
      includePaths: [
        'node_modules', 'bower_components', 'app', '.'
      ]
    }
    // context: helpers.root()
  }
}),

Also tried with the previous version and this in the module.export option side to side with the plugins:

sassLoader: {
  includePaths: [
    'node_modules', 'bower_components', 'src', '.'
  ]
},

ionic info:

Cordova CLI: 6.3.1
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0
OS: Distributor ID:	Ubuntu Description:	Ubuntu 16.10 
Node Version: v6.6.0