We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is my webpack.config.js.
webpack.config.js
const path = require("path"); const HtmlPlugin = require("html-webpack-plugin"); const AutodllPlugin = require("autodll-webpack-plugin"); module.exports = { context: path.resolve(__dirname, "src"), entry: { index: "./index.js" }, output: { path: path.resolve(__dirname, "build"), filename: "[name].js" }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: "babel-loader" }, { test: /pixi-layers/, use: { loader: "imports-loader", options: "PIXI=pixi.js" } } ] }, plugins: [ new HtmlPlugin({ template: "index.ejs" }), new AutodllPlugin({ inject: true, filename: "[name].[hash].js", entry: { vendor: ["pixi-layers", "pixi.js"] } }) ] };
Since pixi-layers use a global PIXI, I use imports-loader to add a PIXI import for pixi-layers. This makes pixi-layers work.
pixi-layers
imports-loader
But after using autodll-webpack-plugin, imports-loader takes no effect, and pixi-layers raise an error Uncaught ReferenceError: PIXI is not defined.
autodll-webpack-plugin
Uncaught ReferenceError: PIXI is not defined
See my demo: webpack-demo.zip
The text was updated successfully, but these errors were encountered:
Hi, @arzyu Thanks for telling me about this!
This is related to #37 and It will be fixed in the next version.
By the way, I would love the hear your feedback on the proposed solution
Have a great day (: Asaf
Sorry, something went wrong.
No branches or pull requests
Here is my
webpack.config.js
.Since
pixi-layers
use a global PIXI, I useimports-loader
to add a PIXI import for pixi-layers. This makespixi-layers
work.But after using
autodll-webpack-plugin
,imports-loader
takes no effect, andpixi-layers
raise an errorUncaught ReferenceError: PIXI is not defined
.See my demo: webpack-demo.zip
The text was updated successfully, but these errors were encountered: