设想:
这样做的好处是包更小,开发时的周转时间要快得多。
现在我们想开始使用第4 阶段的 可选链接功能,该功能可以在 Chrome 中使用标志启用。
我试着用谷歌搜索这个,我能找到的只是babel 有一个插件。
问题:有什么方法可以让 webpack 在省略 babel 的同时接受这种语法?
以下是 webpack 当前报告的内容:
ERROR in ./src/js/components/custom-select.js 245:12
Module parse failed: Unexpected token (245:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| */
| focus() { …Run Code Online (Sandbox Code Playgroud)