Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not create source maps for production build #486

Merged
merged 1 commit into from
Jul 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Do not create source maps for production build
  • Loading branch information
Stefan Buck committed Jul 21, 2018
commit 2bb86c069f7c0fc434fd9910fed3a398ea805539
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"package": "yarn build && web-ext build --source-dir dist --artifacts-dir out --overwrite-dest",
"release": "webstore upload --source dist --auto-publish",
"build": "webpack --mode=production",
"watch": "webpack --watch",
"watch": "webpack --watch --mode=development",
"chrome-open": "yarn build && yarn chrome-launch --",
"chrome-launch": "node scripts/chrome-launch.js",
"firefox-open": "yarn build && yarn firefox-launch --",
Expand Down
6 changes: 3 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin'); // eslint-disable-line

module.exports = {
module.exports = (env, argv) => ({
mode: 'development',
entry: {
app: './packages/core/app',
background: './packages/core/background/index',
options: './packages/helper-settings/page',
},
devtool: 'source-map',
devtool: argv.mode === 'development' ? 'source-map' : '',
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
Expand All @@ -27,4 +27,4 @@ module.exports = {
},
],
},
};
});