1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 |
|
7 | const loader_utils_1 = require("loader-utils");
|
8 |
|
9 | const chalk_1 = require("chalk");
|
10 |
|
11 | const JSX_REGEX = /\.jsx$/;
|
12 |
|
13 | module.exports = function () {
|
14 | const extension = JSX_REGEX.test(this.resourcePath) ? '.jsx' : '.tsx';
|
15 | const options = loader_utils_1.getOptions(this);
|
16 | throw new Error(`sewing-kit could not parse ${chalk_1.default.bold(this.resourcePath.replace(options.root, ''))} because ${extension} files depend on React.\nIf this is a React application, add React's libraries using ${chalk_1.default.bold('yarn add react react-dom')}`);
|
17 | }; |
\ | No newline at end of file |