We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a955263 commit 322681cCopy full SHA for 322681c
packages/react-dev-utils/ModuleScopePlugin.js
@@ -9,6 +9,7 @@
9
10
'use strict';
11
12
+const chalk = require('chalk');
13
const path = require('path');
14
15
class ModuleScopePlugin {
@@ -51,7 +52,9 @@ class ModuleScopePlugin {
51
52
if (requestRelative[0] === '.') {
53
callback(
54
new Error(
- `You attempted to require ${request.__innerRequest_request}, which falls outside of src/.`
55
+ `You attempted to import ${chalk.cyan(request.__innerRequest_request)} which falls outside of the project ${chalk.cyan('src/')} directory. ` +
56
+ `Relative imports outside of ${chalk.cyan('src/')} are not supported. ` +
57
+ `You can either move it inside ${chalk.cyan('src/')}, or add a symlink to it from project's ${chalk.cyan('node_modules/')}.`
58
),
59
request
60
);
0 commit comments