Possible alternative way to handle CSS @import
Closed this issue · 4 comments
marcandrews commented
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
@winkerVSbecks FYI, the context is using ngc
directly.
winkerVSbecks commented
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
@watrool did you ever come up with a work around for this?
troyt-42 commented
@bennett000, Varun has provided a fix and merged it to starters.