Skip to content

Instantly share code, notes, and snippets.

@mklasen
Created December 2, 2019 15:17
Show Gist options
  • Save mklasen/c1328ba53bda05a00c1ad46af2c745cd to your computer and use it in GitHub Desktop.
Save mklasen/c1328ba53bda05a00c1ad46af2c745cd to your computer and use it in GitHub Desktop.
Basic webpack setup
{
"presets": [
"@babel/preset-env"
]
}
{
"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"
}
}
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