久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <small id='gYgOp'></small><noframes id='gYgOp'>

      <i id='gYgOp'><tr id='gYgOp'><dt id='gYgOp'><q id='gYgOp'><span id='gYgOp'><b id='gYgOp'><form id='gYgOp'><ins id='gYgOp'></ins><ul id='gYgOp'></ul><sub id='gYgOp'></sub></form><legend id='gYgOp'></legend><bdo id='gYgOp'><pre id='gYgOp'><center id='gYgOp'></center></pre></bdo></b><th id='gYgOp'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='gYgOp'><tfoot id='gYgOp'></tfoot><dl id='gYgOp'><fieldset id='gYgOp'></fieldset></dl></div>

        <bdo id='gYgOp'></bdo><ul id='gYgOp'></ul>
    1. <legend id='gYgOp'><style id='gYgOp'><dir id='gYgOp'><q id='gYgOp'></q></dir></style></legend>
      <tfoot id='gYgOp'></tfoot>

        SyntaxError: 'import' 和 'export' 可能只出

        SyntaxError: #39;import#39; and #39;export#39; may appear only with #39;sourceType: module#39; - Gulp(SyntaxError: import 和 export 可能只出現(xiàn)在 sourceType: module 中 - Gulp)

              <small id='DYbqj'></small><noframes id='DYbqj'>

                <tbody id='DYbqj'></tbody>
              <i id='DYbqj'><tr id='DYbqj'><dt id='DYbqj'><q id='DYbqj'><span id='DYbqj'><b id='DYbqj'><form id='DYbqj'><ins id='DYbqj'></ins><ul id='DYbqj'></ul><sub id='DYbqj'></sub></form><legend id='DYbqj'></legend><bdo id='DYbqj'><pre id='DYbqj'><center id='DYbqj'></center></pre></bdo></b><th id='DYbqj'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='DYbqj'><tfoot id='DYbqj'></tfoot><dl id='DYbqj'><fieldset id='DYbqj'></fieldset></dl></div>

              <legend id='DYbqj'><style id='DYbqj'><dir id='DYbqj'><q id='DYbqj'></q></dir></style></legend>

                <bdo id='DYbqj'></bdo><ul id='DYbqj'></ul>
                  <tfoot id='DYbqj'></tfoot>
                  本文介紹了SyntaxError: 'import' 和 'export' 可能只出現(xiàn)在 'sourceType: module' 中 - Gulp的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時送ChatGPT賬號..

                  考慮以下兩個文件:

                  app.js

                  import Game       from './game/game';
                  import React      from 'react';
                  import ReactDOM   from 'react-dom';
                  
                  export default (absPath) => {
                    let gameElement = document.getElementById("container");
                  
                    if (gameElement !== null) {
                        ReactDOM.render(
                            <Game mainPath={absPath} />,
                            gameElement
                        );
                    }
                  }
                  

                  index.js

                  import App from './src/app';
                  

                  gulpfile.js

                  var gulp        = require('gulp');
                  var source      = require('vinyl-source-stream');
                  var browserify  = require('browserify');
                  var babelify    = require("babelify");
                  var watch       = require('gulp-watch');
                  
                  gulp.task('make:game', function(){
                    return browserify({
                      entries: [
                        'index.js'
                      ]
                    })
                    .transform('babelify')
                    .bundle()
                    .pipe(source('index.js'))
                    .pipe(gulp.dest('app/'));
                  });
                  

                  錯誤:

                  gulp make:game
                  [13:09:48] Using gulpfile ~/Documents/ice-cream/gulpfile.js
                  [13:09:48] Starting 'make:game'...
                  
                  events.js:154
                        throw er; // Unhandled 'error' event
                        ^
                  SyntaxError: 'import' and 'export' may appear only with 'sourceType: module'
                  

                  這是什么錯誤?我做錯了什么?

                  推薦答案

                  舊版本的 Babel 提供了開箱即用的一切.較新的版本要求您安裝安裝所需的任何插件.首先,您需要安裝 ES2015 預(yù)設(shè).

                  Older versions of Babel came with everything out of the box. The newer version requires you install whichever plugins your setup needs. First, you'll need to install the ES2015 preset.

                  npm install babel-preset-es2015 --save-dev
                  

                  接下來,你需要告訴 babelify 使用你安裝的預(yù)設(shè).

                  Next, you need to tell babelify to use the preset you installed.

                  return browserify({ ... })
                    .transform(babelify.configure({
                      presets: ["es2015"]
                    }))
                    ...
                  

                  來源

                  這篇關(guān)于SyntaxError: 'import' 和 'export' 可能只出現(xiàn)在 'sourceType: module' 中 - Gulp的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運算符上的意外令牌)
                  Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標(biāo)志傳遞給 Gulp 以使其以不同的方式運行任務(wù)?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運行 Gulp 任務(wù))
                  Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                  Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時 Visual Studio 2015 崩潰)

                  <i id='ziUNr'><tr id='ziUNr'><dt id='ziUNr'><q id='ziUNr'><span id='ziUNr'><b id='ziUNr'><form id='ziUNr'><ins id='ziUNr'></ins><ul id='ziUNr'></ul><sub id='ziUNr'></sub></form><legend id='ziUNr'></legend><bdo id='ziUNr'><pre id='ziUNr'><center id='ziUNr'></center></pre></bdo></b><th id='ziUNr'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ziUNr'><tfoot id='ziUNr'></tfoot><dl id='ziUNr'><fieldset id='ziUNr'></fieldset></dl></div>
                    • <bdo id='ziUNr'></bdo><ul id='ziUNr'></ul>

                      • <legend id='ziUNr'><style id='ziUNr'><dir id='ziUNr'><q id='ziUNr'></q></dir></style></legend>

                          <tfoot id='ziUNr'></tfoot>
                        1. <small id='ziUNr'></small><noframes id='ziUNr'>

                            <tbody id='ziUNr'></tbody>
                            主站蜘蛛池模板: 青青久久久 | 国产特级毛片aaaaaa喷潮 | 日韩精品二区 | 久久久91精品国产一区二区精品 | 国产一区二区三区久久久久久久久 | 人人看人人干 | 一级看片免费视频囗交动图 | 99精品国产一区二区青青牛奶 | 欧美性网 | 色播视频在线观看 | 国产精品视频偷伦精品视频 | 99精品观看 | 一区二区三区中文字幕 | 久久久www成人免费精品 | 国产乱人伦精品一区二区 | 日本免费一区二区三区四区 | 农村妇女毛片精品久久久 | 久久成人人人人精品欧 | 在线成人 | 精品欧美视频 | 精品久久久久久亚洲综合网 | 一区二区三区国产好的精 | 国产精品久久免费观看 | 蜜臀久久99精品久久久久野外 | 91视频国产精品 | 伊人色综合久久天天五月婷 | 涩涩视频在线播放 | 亚洲美女网站 | 自拍 亚洲 欧美 老师 丝袜 | av日韩一区 | 91视频导航 | 国产一区二区高清在线 | 精品欧美一区免费观看α√ | 国产高清久久 | 91精品国产乱码久久久 | 91九色在线观看 | 欧美激情a∨在线视频播放 成人免费共享视频 | 亚洲成人一二区 | 国产精品毛片一区二区在线看 | 色爱综合 | 亚洲欧美日韩精品久久亚洲区 |