Skip to content

Commit 867e9e3

Browse files
author
Michael Vurchio
committed
Merge branch 'hotfix/0.1.1'
2 parents 2057e45 + 9d21cba commit 867e9e3

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Svelte preprocess CSS Modules, changelog
2+
3+
# 0.1.1
4+
- Fix modules exports
5+
- Fix `includePaths` check
6+
- Update `loader-utils` package
7+
8+
# 0.1.0
9+
- Initial commit

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ const markup = async ({ content, filename }) => {
4040

4141
if (pluginOptions.includePaths.length) {
4242
for (const includePath of pluginOptions.includePaths) {
43-
if (filename.indexOf(path.resolve(__dirname, includePath)) === -1) {
43+
if (filename.indexOf(path.resolve(includePath)) === -1) {
4444
return { code };
4545
}
4646
}
4747
}
4848

4949
if (!regex.module.test(content)) {
5050
return { code };
51-
}
51+
}
5252

5353
const styles = content.match(regex.style);
5454
let parsedStyles = null;
@@ -85,7 +85,7 @@ const markup = async ({ content, filename }) => {
8585
}
8686
};
8787

88-
export default (options) => {
88+
module.exports = (options) => {
8989
for (const option in options) {
9090
pluginOptions[option] = options[option];
9191
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "svelte-preprocess-cssmodules",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Svelte preprocessor to generate CSS Modules classname on Svelte components",
55
"keywords": [
66
"svelte",
@@ -24,7 +24,7 @@
2424
"url": "https://github.com/micantoine/svelte-preprocess-cssmodules.git"
2525
},
2626
"dependencies": {
27-
"loader-utils": "^1.1.0"
27+
"loader-utils": "^2.0.0"
2828
},
2929
"peerDependencies": {
3030
"svelte": ">1.44.0"

0 commit comments

Comments
 (0)