Skip to content

Instantly share code, notes, and snippets.

@gitexec
Created July 26, 2018 01:32
Show Gist options
  • Save gitexec/5ddc0db9ea44044e02c6d906c8b7459d to your computer and use it in GitHub Desktop.
Save gitexec/5ddc0db9ea44044e02c6d906c8b7459d to your computer and use it in GitHub Desktop.
script example to run webpack on prod and dev
"scripts": {
"build": "npm run clean && npm run compile",
"compile": "NODE_ENV=production webpack --config ./webpack.config.js --progress",
"clean": "rm -rf ./build/bundle*.js",
"sass-compile": "node-sass dist/scss -o dist/css",
"webpack": "webpack-dev-server --config ./webpack.dev.config.js --watch --open",
"start": "yarn run sass-compile && concurrently --kill-others \"yarn run sass-compile --watch\" \"yarn run webpack\"",
"test": "eslint **/*.js"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment