Commit 66d78004 authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

enabling hot reload for webpack components

parent 5d78f47e
Pipeline #1951 failed with stage
in 60 minutes and 3 seconds
<template>
<div>
{{ greeting }}
</div>
<div>
{{ greeting }}
<data-box></data-box>
</div>
</template>
<script>
import DataBox from '../DataBox.vue'
export default {
name: 'test-chart',
data () {
return {
greeting: 'Hello World'
greeting: 'Hello World!'
}
},
components: {
DataBox
}
}
</script>
......
import Vue from 'vue'
import TestChart from '../components/charts/test-chart.vue'
import CorrelationAnalysis from '../components/charts/correlation-analysis.vue'
import TestChart from '../components/charts/TestChart.vue'
import CorrelationAnalysis from '../components/charts/CorrelationAnalysis.vue'
export default class {
constructor () {
......
......@@ -2,7 +2,10 @@ const webpack = require('webpack')
const path = require('path')
const env = require('yargs').argv.env
let plugins = []
let plugins = [
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin()
]
let filename = ''
const library = 'fractal'
......@@ -14,14 +17,21 @@ if (env === 'build') {
}
module.exports = {
entry: ['babel-polyfill', path.resolve(__dirname, 'src/main.js')],
entry: [
'babel-polyfill',
path.resolve(__dirname, 'src/main.js')
],
devtool: '#inline-source-map',
devServer: {
hot: true,
inline: true,
},
plugins: plugins,
output: {
path: path.resolve(__dirname, 'lib'),
library: library,
libraryTarget: 'var',
filename: filename
filename: filename,
},
module: {
rules: [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment