Skip to content

Commit d6b8563

Browse files
committedNov 4, 2017
不解析vue文件与其他不准备使用的css预处理文件
1 parent 3158610 commit d6b8563

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed
 

‎build/webpack.base.conf.js

+4-10
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,21 @@ module.exports = {
1919
config.build.assetsPublicPath : config.dev.assetsPublicPath
2020
},
2121
resolve: {
22-
extensions: ['.ts', '.tsx', '.css', '.scss', '.sass', '.stylus', '.styl', '.js', '.vue', '.json'],
22+
extensions: ['.ts', '.css', '.scss', '.js', '.json'],
2323
alias: {
24-
'vue$': 'vue/dist/vue.esm.js',
25-
'@': resolve('src'),
24+
'@': resolve('src')
2625
}
2726
},
2827
module: {
2928
rules: [{
30-
test: /\.(js|vue)$/,
29+
test: /\.js$/,
3130
loader: 'eslint-loader',
3231
enforce: 'pre',
3332
include: [resolve('src'), resolve('test')],
3433
options: {
3534
formatter: require('eslint-friendly-formatter')
3635
}
3736
},
38-
{
39-
test: /\.vue$/,
40-
loader: 'vue-loader',
41-
options: vueLoaderConfig
42-
},
4337
{
4438
test: /\.js$/,
4539
loader: 'babel-loader',
@@ -51,7 +45,7 @@ module.exports = {
5145
include: [resolve('src')]
5246
},
5347
{
54-
test: /\.tsx?$/,
48+
test: /\.ts$/,
5549
loader: 'ts-loader',
5650
include: [resolve('src')]
5751
},

‎src/app.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import Vue from 'vue';
22
import router from './router/index';
33
require('normalize.css');
44
require('./app.scss');
5+
require('./i18n/zh_cn.json');
56

67
Vue.config.productionTip = false;
78

‎src/i18n/zh_cn.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"a": 111,
3+
"b": 222
4+
}
File renamed without changes.

0 commit comments

Comments
 (0)
Please sign in to comment.