Skip to content

Instantly share code, notes, and snippets.

@Nemikolh
Forked from oal/webpack.config.js
Last active October 23, 2015 11:01
Show Gist options
  • Save Nemikolh/b194c5d2283cb114d0e1 to your computer and use it in GitHub Desktop.
Save Nemikolh/b194c5d2283cb114d0e1 to your computer and use it in GitHub Desktop.
Webpack config for Pixi.js using Typescript.
// fast version does not includes shaders and filters
var webpack = require('webpack');
var path = require('path');
module.exports = {
entry: './src/game.js',
output: {
filename: 'build/game.js'
},
node: {
fs: 'empty'
},
module: {
loaders: [
{
test: /\.json$/,
include: path.join(__dirname, 'node_modules', 'pixi.js'),
loader: 'json',
},
{
test: /\.ts$/,
loader: 'ts'
}
]
}
};
// full version: include evertything
// Requires brfs and transform-loader
var webpack = require('webpack');
var path = require('path');
module.exports = {
entry: './src/game.js',
output: {
filename: '../build/game.js'
},
module: {
postLoaders: [
{
loader: "transform?brfs"
}
],
loaders: [
{
test: /\.json$/,
include: path.join(__dirname, 'node_modules', 'pixi.js'),
loader: 'json',
},
{
test: /\.ts$/,
loader: 'ts'
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment