Have source-map-loader ignore node_modules packages
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: ['./ts/index.tsx'],
|
entry: ['./ts/index.tsx'],
|
||||||
@@ -25,6 +25,11 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
loader: 'source-map-loader',
|
loader: 'source-map-loader',
|
||||||
|
exclude: [
|
||||||
|
// instead of /\/node_modules\//
|
||||||
|
path.join(process.cwd(), 'node_modules'),
|
||||||
|
path.join(process.cwd(), '../..', 'node_modules'),
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.tsx?$/,
|
test: /\.tsx?$/,
|
||||||
|
Reference in New Issue
Block a user