Last active
January 27, 2024 08:30
-
-
Save Aleksey-Danchin/4170890f2d50ebe6e1d6d8cf6a05a3f3 to your computer and use it in GitHub Desktop.
Start of wds
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"], | |
| "plugins": ["@babel/plugin-transform-runtime"] | |
| } |
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
| .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 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
| :~$ 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 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
| <!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 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
| "scripts": { | |
| "serve": "webpack-dev-server --mode development", | |
| "nodemon": "nodemon --exec babel-node server.js", | |
| "build": "webpack --mode production", | |
| "test": "mocha --require @babel/register" | |
| }, |
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
| 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