Last active
November 21, 2019 20:23
-
-
Save dimgeorgiev1976/40666076c4164be1af9cf2b60489a2d8 to your computer and use it in GitHub Desktop.
This file contains 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"], | |
"plugins": ["@babel/plugin-transform-runtime"] | |
} |
This file contains 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
.DS_Store | |
node_modules | |
/dist | |
# local env files | |
.env.local | |
.env.*.local | |
# Log files | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* | |
# Editor directories and files | |
.idea | |
.vscode | |
*.suo | |
*.ntvs* | |
*.njsproj | |
*.sln | |
*.sw* |
This file contains 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
:~$ npm install --save-dev @babel/core @babel/node @babel/cli @babel/preset-env @babel/plugin-transform-runtime @babel/runtime babel-loader webpack webpack-dev-server webpack-cli | |
:~$ npm install -g @babel/core @babel/node @babel/cli @babel/preset-env @babel/plugin-transform-runtime @babel/runtime babel-loader |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<script src='/dist/app.js'></script> | |
</body> | |
</html> |
This file contains 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
"scripts": { | |
"test": "mocha --require @babel/register", | |
"serve": "webpack-dev-server --mode development", | |
"nodemon": "nodemon --exec babel-node server.js", | |
"build": "webpack --mode production" | |
}, |
This file contains 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
const path = require('path') | |
module.exports = { | |
entry: { | |
app: './src/index.js' | |
}, | |
output: { | |
filename: '[name].js', | |
path: path.join(__dirname, '/dist'), | |
publicPath: '/dist' | |
}, | |
module: { | |
rules: [{ | |
test: /\.js$/, | |
loader: 'babel-loader', | |
exclude: '/node_modules/' | |
}] | |
}, | |
devServer: { | |
overlay: true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment