Update dev server to only serve the playground

Now that we don't rely on node_modules, we can update the content base to just `playground` and just look at it from http://localhost:8080/
This commit is contained in:
Ray Schamp 2016-09-26 10:02:24 -04:00
parent e9cb0a5102
commit 6b1d2a8eb6
7 changed files with 19 additions and 18 deletions

View file

@ -1,8 +1,13 @@
var CopyWebpackPlugin = require('copy-webpack-plugin');
var defaultsDeep = require('lodash.defaultsdeep');
var path = require('path');
var webpack = require('webpack');
var base = {
devServer: {
contentBase: path.resolve(__dirname, 'playground'),
host: '0.0.0.0'
},
module: {
loaders: [
{
@ -57,8 +62,8 @@ module.exports = [
// Playground
defaultsDeep({}, base, {
entry: {
'playground/vm': './src/index.js',
'playground/vendor': [
'vm': './src/index.js',
'vendor': [
// FPS counter
'stats.js/build/stats.min.js',
// Syntax highlighter
@ -70,7 +75,7 @@ module.exports = [
]
},
output: {
path: __dirname,
path: path.resolve(__dirname, 'playground'),
filename: '[name].js'
},
module: {
@ -100,10 +105,9 @@ module.exports = [
plugins: base.plugins.concat([
new CopyWebpackPlugin([{
from: 'node_modules/scratch-blocks/media',
to: 'playground/media'
to: 'media'
}, {
from: 'node_modules/highlightjs/styles/zenburn.css',
to: 'playground'
from: 'node_modules/highlightjs/styles/zenburn.css'
}])
])
})