I want to use es6 import and export featues with grunt setup, but i don't want to use webpack to use import and export,
so Is there any way to use es6 import and export with grunt without using webpack ???
我的 grunt-babel 定义是:
babel: {
options: {
sourceMap: true,
presets: ['es2015']
},
build: {
files: [{
expand: true, // Enable dynamic expansion
cwd: 'src/jass',
src: ['**/*.js'], // Actual patterns to match
dest: 'src/j'
}]
}
}
我已经把问题陈述上传到Github了,谢谢refer it
最佳答案
你可能想阅读关于 babel-cli
的内容,它可以做你想做的事,或者如果你的主要关注点是获取 import
和 export
工作,你可以使用 babel-node
。
关于javascript - 有没有办法在不使用 webpack 的情况下使用 grunt 的 es6 导入和导出功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37456465/