Skip to content

Commit

Permalink
chore: add sourcemaps and production mode in webpack bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
juandjara authored Feb 4, 2021
1 parent 5cf14fd commit a24778c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Not released

- Fix an issue on histogram's operations when processing a not finite value [#79](https://github.com/CartoDB/carto-react-lib/pull/79)
- Add sourcemaps and production mode in webpack bundles [#83](https://github.com/CartoDB/carto-react-lib/pull/83)

## 1.0.0-beta13 (2021-02-02)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0-beta13",
"description": "CARTO for React",
"scripts": {
"start": "rm -rf dist && mkdir dist && cp package.json ./dist/package.json && webpack --config webpack.prod.js --watch",
"start": "rm -rf dist && mkdir dist && cp package.json ./dist/package.json && webpack --config webpack.config.js --watch",
"build": "rm -rf dist && mkdir dist && cp package.json ./dist/package.json && cp README.md ./dist/README.md && webpack --config webpack.prod.js",
"lint": "eslint 'src/**/*.{js,jsx}'",
"lint:fix": "eslint 'src/**/*.{js,jsx}' --fix",
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const path = require('path');

const config = {
mode: 'development',
devtool: 'eval',
externals: [
{
react: 'react',
Expand Down
6 changes: 4 additions & 2 deletions webpack.prod.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// const path = require('path');
const config = require('./webpack.config.js');

config.mode = 'production';
for (const c of config) {
c.mode = 'production';
c.devtool = 'source-map';
}

module.exports = config;

0 comments on commit a24778c

Please sign in to comment.