update webpack to version 3

This commit is contained in:
Chanwit Piromplad
2017-10-15 20:34:19 +07:00
parent 05d69520af
commit 50130a7a4d
36 changed files with 48756 additions and 37294 deletions

View File

@@ -16,11 +16,6 @@ var webpackConfig = merge(baseConfig, {
loaders: utils.styleLoaders()
},
devtool: '#inline-source-map',
vue: {
loaders: {
js: 'isparta'
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../../config/test.env')
@@ -31,15 +26,18 @@ var webpackConfig = merge(baseConfig, {
// no need for app entry during tests
delete webpackConfig.entry
// function resolve (dir) {
// return path.join(__dirname, '..', dir)
// }
// make sure isparta loader is applied before eslint
webpackConfig.module.preLoaders = webpackConfig.module.preLoaders || []
webpackConfig.module.preLoaders.unshift({
test: /\.js$/,
loader: 'isparta',
include: path.resolve(projectRoot, 'src')
})
// webpackConfig.module.rules = webpackConfig.module.rules || []
// webpackConfig.module.rules.unshift({
// test: /\.js$/,
// loader: 'babel-loader',
// include: [resolve('src'), resolve('test')]
// })
// only apply babel for test files when using isparta
// // only apply babel for test files when using isparta
webpackConfig.module.loaders.some(function (loader, i) {
if (loader.loader === 'babel') {
loader.include = path.resolve(projectRoot, 'test/unit')

View File

@@ -1,5 +1,5 @@
import Vue from 'vue'
import BarChart from 'src/examples/BarExample'
import BarChart from '@/examples/BarExample'
describe('BarChart', () => {
let el

View File

@@ -1,5 +1,5 @@
import Vue from 'vue'
import BubbleChart from 'src/examples/BubbleExample'
import BubbleChart from '@/examples/BubbleExample'
describe('BubbleChart', () => {
let el

View File

@@ -1,5 +1,5 @@
import Vue from 'vue'
import DoughnutChart from 'src/examples/DoughnutExample'
import DoughnutChart from '@/examples/DoughnutExample'
describe('DoughnutChart', () => {
let el

View File

@@ -1,5 +1,5 @@
import Vue from 'vue'
import HorizontalBarChart from 'src/examples/HorizontalBarExample'
import HorizontalBarChart from '@/examples/HorizontalBarExample'
describe('HorizontalBarChart', () => {
let el

View File

@@ -1,5 +1,5 @@
import Vue from 'vue'
import LineChart from 'src/examples/LineExample'
import LineChart from '@/examples/LineExample'
describe('LineChart', () => {
let el

View File

@@ -1,5 +1,5 @@
import Vue from 'vue'
import PieChart from 'src/examples/PieExample'
import PieChart from '@/examples/PieExample'
describe('PieChart', () => {
let el

View File

@@ -1,5 +1,5 @@
import Vue from 'vue'
import PolarChart from 'src/examples/PolarAreaExample'
import PolarChart from '@/examples/PolarAreaExample'
describe('PolarChart', () => {
let el

View File

@@ -1,5 +1,5 @@
import Vue from 'vue'
import RadarChart from 'src/examples/RadarExample'
import RadarChart from '@/examples/RadarExample'
describe('RadarChart', () => {
let el

View File

@@ -1,5 +1,5 @@
import Vue from 'vue'
import ScatterChart from 'src/examples/ScatterExample'
import ScatterChart from '@/examples/ScatterExample'
describe('ScatterChart', () => {
let el

View File

@@ -1,4 +1,4 @@
import { mergeOptions } from 'src/helpers/options'
import { mergeOptions } from '@/helpers/options'
describe('mergeOptions.js', () => {
const a = {