Skip to content

Instantly share code, notes, and snippets.

@MasatoraSakikoyama
Last active April 19, 2018 06:39
Show Gist options
  • Save MasatoraSakikoyama/86e34bb75c7bfaaee0187cf05422e66a to your computer and use it in GitHub Desktop.
Save MasatoraSakikoyama/86e34bb75c7bfaaee0187cf05422e66a to your computer and use it in GitHub Desktop.
init webpack4
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": [
"last 2 versions",
"Explorer >= 8"
]
}
}]
]
}
{
"extends": "airbnb-base",
"globals": {
"window": true,
"document": true
}
}
{
"name": "name",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"develop": "npx webpack --module-bind 'js=babel-loader' --module-bind 'html=html-loader' --entry ./src --output ../bundle.js --mode development",
"production": "npx webpack --module-bind 'js=babel-loader' --module-bind 'html=html-loader' --entry ./src/ --output ../bundle.js --mode production",
"eslint": "npx eslint ./src --fix"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
"babel-preset-env": "^1.6.1",
"eslint": "^4.18.2",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.9.0",
"html-loader": "^0.5.5",
"webpack": "^4.1.1",
"webpack-cli": "^2.0.11"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment