0
這裏是我的代碼爲什麼導入es6不在這裏工作?
// var htmlplugin = require('html-webpack-plugin'); // works!
import htmlplugin from 'html-webpack-plugin'; //not working
當我NPM運行dev來顯示誤差修改,如:
import htmlplugin from 'html-webpack-plugin'
^^^^^^
SyntaxError: Unexpected token import
[NodeJS計劃支持導入/導出es6(es2015)模塊]的可能副本(https://stackoverflow.com/questions/37132031/nodejs-plans-to-support-import-export-es6-es2015-modules ) – frankyjuang