commit 337e0ae7c454f7091b123d4a5438a21bfda79fdb
parent 359d9f3219d7151501d938c04046d45370f9cfd2
Author: Konstantin Tarkus <hello@tarkus.me>
Date: Fri, 24 Jul 2015 00:58:17 +0300
Fix the issue with `path-to-regexp` module cannot be found
Diffstat:
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/package.json b/package.json
@@ -15,7 +15,6 @@
"jade": "1.11.0",
"lodash": "3.10.0",
"normalize.css": "3.0.3",
- "path-to-regexp": "^1.2.0",
"react": "^0.14.0-beta1",
"react-dom": "^0.14.0-beta1",
"react-routing": "0.0.3",
diff --git a/webpack.config.js b/webpack.config.js
@@ -87,7 +87,7 @@ const config = {
{
test: /\.jsx?$/,
include: [
- path.resolve(__dirname, 'node_modules/react-routing'),
+ path.resolve(__dirname, 'node_modules/react-routing/src'),
path.resolve(__dirname, 'src')
],
loader: 'babel-loader'
@@ -95,10 +95,6 @@ const config = {
]
},
- resolveLoader: {
- root: path.join(__dirname, 'node_modules')
- },
-
postcss: [autoprefixer(AUTOPREFIXER_BROWSERS)]
};
@@ -135,7 +131,15 @@ const serverConfig = merge({}, config, {
libraryTarget: 'commonjs2'
},
target: 'node',
- externals: /^[a-z][a-z\.\-0-9]*$/,
+ externals: [
+ function (context, request, cb) {
+ var isExternal =
+ request.match(/^[a-z][a-z\/\.\-0-9]*$/i) &&
+ !request.match(/^react-routing/) &&
+ !context.match(/[\\/]react-routing/);
+ cb(null, Boolean(isExternal));
+ }
+ ],
node: {
console: false,
global: false,