From 45f92a533857210bdc9cbcd9f7d0f9653ec6217e Mon Sep 17 00:00:00 2001 From: Conrad Chan Date: Wed, 25 Mar 2020 13:44:46 -0700 Subject: [PATCH] chore: enable annotations sourcemaps while linked (#1184) --- build/webpack.common.config.js | 3 +++ package.json | 2 ++ 2 files changed, 5 insertions(+) diff --git a/build/webpack.common.config.js b/build/webpack.common.config.js index d46b9c35e..ff7300024 100644 --- a/build/webpack.common.config.js +++ b/build/webpack.common.config.js @@ -5,6 +5,8 @@ const { BannerPlugin, DefinePlugin, NormalModuleReplacementPlugin } = require('w const license = require('./license'); const pkg = require('../package.json'); +const isLinked = process.env.IS_LINKED === '1'; + /* eslint-disable global-require */ /* eslint-disable import/no-dynamic-require */ module.exports = language => { @@ -68,6 +70,7 @@ module.exports = language => { 'react-intl-locale-data': path.resolve(`node_modules/react-intl/locale-data/${locale}`), }, extensions: ['.tsx', '.ts', '.js'], + symlinks: !isLinked, }, stats: { assets: true, diff --git a/package.json b/package.json index 61cbcbeda..971c0272b 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,9 @@ "release:patch": "./build/release.sh -p", "setup": "yarn install", "start": "yarn setup && yarn build:dev --watch", + "start:linked": "yarn link box-annotations && IS_LINKED=1 yarn start", "start:dev": "yarn build:i18n && LANGUAGE=en-US BABEL_ENV=dev NODE_ENV=dev yarn webpack-dev-server --config build/webpack.config.js", + "start:dev:linked": "yarn link box-annotations && IS_LINKED=1 yarn start:dev", "test": "yarn setup && yarn clean && yarn build:i18n && NODE_ENV=test yarn karma start build/karma.conf.js", "test:e2e": "npm-run-all -p -r start:dev cy:run", "test:e2e:open": "npm-run-all -p -r start:dev cy:open",