progateというサイトでES6の環境設定方法があるんですが(https://prog-8.com/docs/es6-env)、それは見本通りできたようです。(右の画像)
ところで、サイトを作りたいんですが、この中のどこにindex.hemlとstylesheet.cssファイルを作ればいいんですか?distの中ですか?node_modulesの中ですか?srcの中ですか?それともes6_sampleの中に直接入れればいいんですかね
package.jason
1 2{ 3 "name": "es6_sample", 4 "version": "1.0.0", 5 "description": "", 6 "main": "index.js", 7 "scripts": { 8 "test": "echo \"Error: no test specified\" && exit 1" 9 }, 10 "keywords": [], 11 "author": "", 12 "license": "ISC", 13 "dependencies": { 14 "@babel/cli": "^7.2.0", 15 "@babel/core": "^7.2.0", 16 "@babel/preset-env": "^7.2.0" 17 } 18} 19
babel.config.js
1 2const presets = [ 3 [ 4 "@babel/env", 5 ], 6]; 7 8module.exports = { presets }; 9