Created
December 2, 2019 15:17
-
-
Save mklasen/c1328ba53bda05a00c1ad46af2c745cd to your computer and use it in GitHub Desktop.
Basic webpack setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": [ | |
"@babel/preset-env" | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Concept", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"build": "webpack" | |
}, | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"csvtojson": "^2.0.10", | |
"webpack": "^5.0.0-beta.7", | |
"webpack-cli": "^3.3.10", | |
"whatwg-fetch": "^3.0.0" | |
}, | |
"devDependencies": { | |
"@babel/core": "^7.7.4", | |
"@babel/preset-env": "^7.7.4", | |
"babel-loader": "^8.0.6" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
entry: ['whatwg-fetch', './index.js'], | |
mode: 'development', | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /node_modules/, | |
use: { | |
loader: "babel-loader" | |
} | |
} | |
] | |
}, | |
output: { | |
filename: '../../www/app.js' | |
}, | |
watch: true | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment