1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 10:51:44 +02:00

Use source-map-loader for more fine-grained sourcemaps. (#1666)

This commit is contained in:
Zach Schneider
2018-02-21 22:35:27 -05:00
committed by Ian Storm Taylor
parent 0935f20c11
commit 2bf04b4a8c
4 changed files with 22 additions and 36 deletions

View File

@@ -18,7 +18,6 @@ import { startCase } from 'lodash'
*/
function configure(pkg, env, target) {
const isDev = env === 'development'
const isProd = env === 'production'
const isUmd = target === 'umd'
const isModule = target === 'module'
@@ -106,13 +105,13 @@ function configure(pkg, env, target) {
{
file: `packages/${pkg.name}/${pkg.module}`,
format: 'es',
sourcemap: isDev,
sourcemap: true,
},
{
file: `packages/${pkg.name}/${pkg.main}`,
format: 'cjs',
exports: 'named',
sourcemap: isDev,
sourcemap: true,
},
],
// We need to explicitly state which modules are external, meaning that

View File

@@ -25,6 +25,11 @@ const config = {
},
module: {
rules: [
{
test: /\.js?$/,
use: 'source-map-loader',
enforce: 'pre',
},
{
test: /\.js?$/,
use: {