mirror of
				https://github.com/KevinMidboe/vue-chartjs.git
				synced 2025-10-29 18:00:20 +00:00 
			
		
		
		
	update webpack to version 3
This commit is contained in:
		| @@ -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') | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| import Vue from 'vue' | ||||
| import BarChart from 'src/examples/BarExample' | ||||
| import BarChart from '@/examples/BarExample' | ||||
|  | ||||
| describe('BarChart', () => { | ||||
|   let el | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| import Vue from 'vue' | ||||
| import BubbleChart from 'src/examples/BubbleExample' | ||||
| import BubbleChart from '@/examples/BubbleExample' | ||||
|  | ||||
| describe('BubbleChart', () => { | ||||
|   let el | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| import Vue from 'vue' | ||||
| import DoughnutChart from 'src/examples/DoughnutExample' | ||||
| import DoughnutChart from '@/examples/DoughnutExample' | ||||
|  | ||||
| describe('DoughnutChart', () => { | ||||
|   let el | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| import Vue from 'vue' | ||||
| import HorizontalBarChart from 'src/examples/HorizontalBarExample' | ||||
| import HorizontalBarChart from '@/examples/HorizontalBarExample' | ||||
|  | ||||
| describe('HorizontalBarChart', () => { | ||||
|   let el | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| import Vue from 'vue' | ||||
| import LineChart from 'src/examples/LineExample' | ||||
| import LineChart from '@/examples/LineExample' | ||||
|  | ||||
| describe('LineChart', () => { | ||||
|   let el | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| import Vue from 'vue' | ||||
| import PieChart from 'src/examples/PieExample' | ||||
| import PieChart from '@/examples/PieExample' | ||||
|  | ||||
| describe('PieChart', () => { | ||||
|   let el | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| import Vue from 'vue' | ||||
| import PolarChart from 'src/examples/PolarAreaExample' | ||||
| import PolarChart from '@/examples/PolarAreaExample' | ||||
|  | ||||
| describe('PolarChart', () => { | ||||
|   let el | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| import Vue from 'vue' | ||||
| import RadarChart from 'src/examples/RadarExample' | ||||
| import RadarChart from '@/examples/RadarExample' | ||||
|  | ||||
| describe('RadarChart', () => { | ||||
|   let el | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| import Vue from 'vue' | ||||
| import ScatterChart from 'src/examples/ScatterExample' | ||||
| import ScatterChart from '@/examples/ScatterExample' | ||||
|  | ||||
| describe('ScatterChart', () => { | ||||
|   let el | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| import { mergeOptions } from 'src/helpers/options' | ||||
| import { mergeOptions } from '@/helpers/options' | ||||
|  | ||||
| describe('mergeOptions.js', () => { | ||||
|   const a = { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user