From b2cbf556c05b3105c5e4c552a8da9c54237a67ca Mon Sep 17 00:00:00 2001 From: EGOIST <0x142857@gmail.com> Date: Fri, 20 Jan 2017 03:46:54 +0800 Subject: [PATCH] always transform .es6 file --- bin/vue-build | 6 +++++- lib/{default-entry.js => default-entry.es6} | 0 2 files changed, 5 insertions(+), 1 deletion(-) rename lib/{default-entry.js => default-entry.es6} (100%) diff --git a/bin/vue-build b/bin/vue-build index 903c5106fa..c72e6e3cc9 100755 --- a/bin/vue-build +++ b/bin/vue-build @@ -158,6 +158,10 @@ var webpackConfig = { loader: 'babel-loader', exclude: [/node_modules/] }, + { + test: /\.es6$/, + loader: 'babel-loader' + }, { test: /\.vue$/, loader: 'vue-loader', @@ -199,7 +203,7 @@ if (options.mount === undefined && !options.lib && /\.vue$/.test(options.entry)) // set an alias to the path of the component // otherwise use it directly as webpack entry if (options.mount) { - webpackConfig.entry.client.push(path.join(__dirname, '../lib/default-entry')) + webpackConfig.entry.client.push(path.join(__dirname, '../lib/default-entry.es6')) webpackConfig.resolve.alias['your-tasteful-component'] = options.entry } else { webpackConfig.entry.client.push(options.entry) diff --git a/lib/default-entry.js b/lib/default-entry.es6 similarity index 100% rename from lib/default-entry.js rename to lib/default-entry.es6