Skip to content

Commit 4e4ed24

Browse files
AlbertLuciantogajus
authored andcommitted
test: add test case for absolute import (gajus#227)
* fix: cannot read property 'split' of undefined * fix: lint error in getClassName * fix: lint error in getClassName * test: add test case for absolute import
1 parent fa15c8d commit 4e4ed24

File tree

5 files changed

+25
-0
lines changed

5 files changed

+25
-0
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"@babel/register": "^7.0.0",
3030
"babel-core": "^7.0.0-bridge.0",
3131
"babel-jest": "^23.6.0",
32+
"babel-plugin-module-resolver": "^3.2.0",
3233
"babel-plugin-tester": "^5.5.1",
3334
"eslint": "^5.5.0",
3435
"eslint-config-canonical": "^12.0.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.a {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import 'abs/bar.css';
2+
3+
<div styleName="a"></div>;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"plugins": [
3+
["module-resolver", {
4+
"alias": {
5+
"abs": "./test/fixtures/react-css-modules/resolves absolute path stylesheets"
6+
}
7+
}],
8+
[
9+
"../../../../src",
10+
{
11+
"generateScopedName": "[name]__[local]"
12+
}
13+
]
14+
]
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"use strict";
2+
3+
require("./bar.css");
4+
5+
<div className="bar__a"></div>;

0 commit comments

Comments
 (0)