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:
committed by
Ian Storm Taylor
parent
0935f20c11
commit
2bf04b4a8c
@@ -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
|
||||
|
@@ -25,6 +25,11 @@ const config = {
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js?$/,
|
||||
use: 'source-map-loader',
|
||||
enforce: 'pre',
|
||||
},
|
||||
{
|
||||
test: /\.js?$/,
|
||||
use: {
|
||||
|
Reference in New Issue
Block a user