- Allow environment selection for prod deploys without sourcemaps
- Ignore any .txt files included with the source
"name": "outline-browser",
"scripts": {
"dev": "npx webpack -w",
- "build": "npx webpack"
+ "build": "ENVIRONMENT=production npx webpack"
},
"devDependencies": {
"@types/keyboardjs": "^2.5.0",
"lodash": "^4.17.21",
"marked": "^4.2.12",
"uuid": "^9.0.0"
+ },
+ "volta": {
+ "node": "18.7.0",
+ "npm": "8.15.0"
}
}
const path = require('path');
const tsconfigPaths = require('tsconfig-paths-webpack-plugin');
+const env = process.env.ENVIRONMENT || 'development';
+
module.exports = {
- mode: "development",
- devtool: "inline-source-map",
+ mode: env,
+ devtool: env === 'environment' ? "inline-source-map" : false,
entry: {
main: "./src/client.ts",
},