Skip to content
Snippets Groups Projects
Commit 2cb26356 authored by Alf Eaton's avatar Alf Eaton
Browse files

Enable sass-loader

parent cea6c0d6
No related branches found
No related tags found
No related merge requests found
const path = require('path') const path = require('path')
const nodeExternals = require('webpack-node-externals') const nodeExternals = require('webpack-node-externals')
const include = [
path.join(__dirname, 'src'),
/xpub-[^/]+\/src/,
]
module.exports = { module.exports = {
entry: './src/index.js', entry: './src/index.js',
output: { output: {
...@@ -21,10 +26,7 @@ module.exports = { ...@@ -21,10 +26,7 @@ module.exports = {
// ES6 modules // ES6 modules
{ {
test: /\.js$/, test: /\.js$/,
include: [ include,
path.join(__dirname, 'src'),
/xpub-[^/]+\/src/,
],
loader: 'babel-loader', loader: 'babel-loader',
options: { options: {
presets: [ presets: [
...@@ -39,10 +41,7 @@ module.exports = { ...@@ -39,10 +41,7 @@ module.exports = {
// CSS modules // CSS modules
{ {
test: /\.local\.css$/, test: /\.local\.css$/,
include: [ include,
path.join(__dirname, 'src'),
/xpub-[^/]+\/src/,
],
use: [ use: [
'style-loader', 'style-loader',
{ {
...@@ -52,6 +51,23 @@ module.exports = { ...@@ -52,6 +51,23 @@ module.exports = {
} }
} }
], ],
},
// SCSS modules
{
test: /\.local\.scss$/,
include,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
modules: true,
importLoaders: 1
}
},
'sass-loader'
],
} }
] ]
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment