Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 44 additions & 24 deletions conf/webpack/Base.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,56 +99,57 @@ class WebpackBaseConfig {
presets: ['es2015']
}
},
{
test: /\.(png|jpg|gif|mp4|ogg|svg|woff|woff2)$/,
loader: 'file-loader'
},
{
test: /^.((?!cssmodule).)*\.css$/,
loaders: [
{ loader: 'style-loader' },
{ loader: 'css-loader' }
{
loader: 'css-loader',
query: { importLoaders: 1 }
},
{ loader: 'postcss-loader' }
]
},
{
test: /\.(png|jpg|gif|mp4|ogg|svg|woff|woff2)$/,
loader: 'file-loader'
},
{
test: /^.((?!cssmodule).)*\.(sass|scss)$/,
loaders: [
{ loader: 'style-loader' },
{ loader: 'css-loader' },
{
loader: 'css-loader',
query: { importLoaders: 1 }
},
{ loader: 'postcss-loader' },
{ loader: 'sass-loader' }
]
},
{
test: /^.((?!cssmodule).)*\.less$/,
loaders: [
{ loader: 'style-loader' },
{ loader: 'css-loader' },
{
loader: 'css-loader',
query: { importLoaders: 1 }
},
{ loader: 'postcss-loader' },
{ loader: 'less-loader' }
]
},
{
test: /^.((?!cssmodule).)*\.styl$/,
loaders: [
{ loader: 'style-loader' },
{ loader: 'css-loader' },
{
loader: 'css-loader',
query: { importLoaders: 1 }
},
{ loader: 'postcss-loader' },
{ loader: 'stylus-loader' }
]
},
{
test: /\.json$/,
loader: 'json-loader'
},
{
test: /\.(js|jsx)$/,
include: [].concat(
this.includedPackages,
[this.srcPathAbsolute]
),
loaders: [
// Note: Moved this to .babelrc
{ loader: 'babel-loader' }
]
},
{
test: /\.cssmodule\.(sass|scss)$/,
loaders: [
Expand All @@ -157,6 +158,7 @@ class WebpackBaseConfig {
loader: 'css-loader',
query: cssModulesQuery
},
{ loader: 'postcss-loader' },
{ loader: 'sass-loader' }
]
},
Expand All @@ -167,7 +169,8 @@ class WebpackBaseConfig {
{
loader: 'css-loader',
query: cssModulesQuery
}
},
{ loader: 'postcss-loader' }
]
},
{
Expand All @@ -178,6 +181,7 @@ class WebpackBaseConfig {
loader: 'css-loader',
query: cssModulesQuery
},
{ loader: 'postcss-loader' },
{ loader: 'less-loader' }
]
},
Expand All @@ -189,8 +193,24 @@ class WebpackBaseConfig {
loader: 'css-loader',
query: cssModulesQuery
},
{ loader: 'postcss-loader' },
{ loader: 'stylus-loader' }
]
},
{
test: /\.json$/,
loader: 'json-loader'
},
{
test: /\.(js|jsx)$/,
include: [].concat(
this.includedPackages,
[this.srcPathAbsolute]
),
loaders: [
// Note: Moved this to .babelrc
{ loader: 'babel-loader' }
]
}
]
},
Expand Down
6 changes: 5 additions & 1 deletion conf/webpack/Test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class WebpackTestConfig extends WebpackBaseConfig {
{
loader: 'css-loader',
query: cssModulesQuery
}
},
{ loader: 'postcss-loader' }
]
},
{
Expand All @@ -48,6 +49,7 @@ class WebpackTestConfig extends WebpackBaseConfig {
loader: 'css-loader',
query: cssModulesQuery
},
{ loader: 'postcss-loader' },
{ loader: 'less-loader' }
]
},
Expand All @@ -59,6 +61,7 @@ class WebpackTestConfig extends WebpackBaseConfig {
loader: 'css-loader',
query: cssModulesQuery
},
{ loader: 'postcss-loader' },
{ loader: 'stylus-loader' }
]
},
Expand All @@ -70,6 +73,7 @@ class WebpackTestConfig extends WebpackBaseConfig {
loader: 'css-loader',
query: cssModulesQuery
},
{ loader: 'postcss-loader' },
{ loader: 'sass-loader' }
]
},
Expand Down
3 changes: 3 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = () => ({
plugins: []
});