rangle / rangle-starter

48 stars 23 forks source link

Possible alternative way to handle CSS @import #198

Closed marcandrews closed 7 years ago

marcandrews commented 8 years ago

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: [ ... ],
}
troyt-42 commented 8 years ago

@winkerVSbecks FYI, the context is using ngc directly.

winkerVSbecks commented 8 years ago

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.

bennett000 commented 8 years ago

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

troyt-42 commented 7 years ago

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