-
-
Save Nemikolh/b194c5d2283cb114d0e1 to your computer and use it in GitHub Desktop.
Webpack config for Pixi.js using Typescript.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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' | |
} | |
] | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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