第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

webpack對es6的支持問題

webpack對es6的支持問題

偶然的你 2019-01-30 16:15:53
webpack配置函數(shù)中沒有配置babel-loader來進(jìn)行es6代碼的轉(zhuǎn)換,也沒有配置.babelrc,那么在index.js中直接使用import不會報錯這是為什么??webpack.config.jsvar path = require('path');module.exports = {    //入口     entry: {         main: './src/index.js',     },     output: {        //所有產(chǎn)出資源路徑         path: path.join(__dirname, 'dist'),         filename: 'main.js',     }, }index.jsimport './a.js';console.log("我是index");
查看完整描述

1 回答

?
浮云間

TA貢獻(xiàn)1829條經(jīng)驗 獲得超4個贊

我想你沒有明白babel是干什么的

What is Babel?

Babel is a JavaScript compiler
Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript in current and older browsers or environments. Here are the main things Babel can do for you:

  • Transform syntax

  • Polyfill features that are missing in your target environment (through * @babel/polyfill)

  • Source code transformations (codemods)

  • And more! (check out these videos for inspiration)

速查各大瀏覽器最新版本對ES6的支持


查看完整回答
反對 回復(fù) 2019-01-30
  • 1 回答
  • 0 關(guān)注
  • 656 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號