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

Enable sass-loader

parent 7d64a9cc
No related branches found
No related tags found
No related merge requests found
......@@ -4,11 +4,11 @@
cursor: pointer;
}
.inline {
.root.inline {
display: inline-flex;
}
.inline:not(:last-child) {
.root.inline:not(:last-child) {
margin-right: 1rem;
}
......
......@@ -4,6 +4,11 @@ process.env.NODE_ENV = 'development'
const path = require('path')
const nodeExternals = require('webpack-node-externals')
const include = [
path.join(__dirname, 'src'),
/xpub-[^/]+\/src/,
]
module.exports = {
entry: './src/index.js',
output: {
......@@ -24,10 +29,7 @@ module.exports = {
// ES6 modules
{
test: /\.js$/,
include: [
path.join(__dirname, 'src'),
/xpub-[^/]+\/src/,
],
include,
loader: 'babel-loader',
options: {
presets: [
......@@ -42,10 +44,7 @@ module.exports = {
// CSS modules
{
test: /\.local\.css$/,
include: [
path.join(__dirname, 'src'),
/xpub-[^/]+\/src/,
],
include,
use: [
'style-loader',
{
......@@ -57,7 +56,24 @@ module.exports = {
],
},
// CSS
// SCSS modules
{
test: /\.local\.scss$/,
include,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
modules: true,
importLoaders: 1
}
},
'sass-loader'
],
},
// global CSS
{
test: /\.css$/,
use: [
......@@ -66,6 +82,21 @@ module.exports = {
],
},
// global SCSS
{
test: /\.scss$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
importLoaders: 1
}
},
'sass-loader'
],
},
// Files
{
exclude: [/\.js$/, /\.html$/, /\.json$/],
......
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