rangle/rangle-starter

Possible alternative way to handle CSS @import

Closed this issue · 4 comments

An alternative way of handling CSS @import is use Webpack's preLoaders. For example:

module: {
  preLoaders: [
      {
        test: /\.css$/,
        include: path.resolve(__dirname, 'src/app'),
        loader: ExtractTextPlugin.extract({
          fallbackLoader: 'style',
          loader: 'css?sourceMap',
        }),
      },
  ],
  loaders: [ ... ],
}

@winkerVSbecks FYI, the context is using ngc directly.

Tried a couple of tests of not using postcss-loader. tldr; it doesn't work.

We can import all basscss/tachyons files as requires. However, then we don't have access to variables and some of those files import other npm modules which fails because we don't have postcss-import.

@watrool did you ever come up with a work around for this?

@bennett000, Varun has provided a fix and merged it to starters.