winterNebs

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. Thanks for the reply, but I don't think that's the case. The device I'm running it on is Chrome 74 on a windows 10 desktop. It works perfectly fine when I used browserify, but not when I webpack it.
  2. Hi, so before I had an app that was working with browserify. After switching to webpack instead I got the error "Uncaught Error: WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support." My project is running: Typescript 3.4.5, Pixi.js 5.0.2, Webpack 4.31.0 Here's a snippet of my Webpack.config.js, the Client section is the part of the code that uses pixi.js /// <binding BeforeBuild='Run - Development' /> const HtmlWebpackPlugin = require('html-webpack-plugin'); const path = require('path'); var pixiModule = path.join(__dirname, '/node_modules/pixi.js/') const CleanWebpackPlugin = require('clean-webpack-plugin'); module.exports = [ // Server { mode: "development", devtool: "inline-source-map", entry: "./app.ts", output: { filename: "./app.js" }, target: 'node', node: { __dirname: false, __filename: false, }, resolve: { // Add `.ts` and `.tsx` as a resolvable extension. extensions: [".ts", ".tsx", ".js"] }, module: { rules: [ // all files with a `.ts` or `.tsx` extension will be handled by `ts-loader` { test: /\.tsx?$/, loader: "ts-loader" } ] }, plugins: [ new CleanWebpackPlugin() ] }, // Client { mode: "development", devtool: "inline-source-map", entry: "./public/typescripts/entry.ts", output: { library: "ASC", filename: "public/client.js" }, target: 'web', resolve: { // Add `.ts` and `.tsx` as a resolvable extension. alias: { 'PIXI': pixiModule, }, extensions: [".ts", ".tsx", ".js"] }, module: { rules: [ // all files with a `.ts` or `.tsx` extension will be handled by `ts-loader` { test: /\.tsx?$/, loader: "ts-loader" }, { test: /\.json$/, include: path.join(__dirname, 'node_modules', 'pixi.js'), loader: 'json-loader' }, //We expose the non minified pixi file as a global. The minified one was not working with our solution { test: pixiModule, loader: 'expose-loader?pixi' } ] }, plugins: [ new HtmlWebpackPlugin({ filename: 'public/index.html', template: 'public/index.html', inject: false }), new HtmlWebpackPlugin({ filename: 'public/game.html', template: 'public/game.html', inject: false }) ] } ]; If anyone could point me in the right direction it would be much appreciated! I'm pretty new to the javascript ecosystem so I'm not really sure if this is a pixi.js issue or a webpack issue. Thanks!