A couple of hours searching for the swf webpack loader has yielded poor results. I only understand that I do need a loader at this point. Since swf is an Adobe Flash file, I believe I just have to declare it's mime type and include it with a file-loader, but I haven't tried it. This is my webpack.config.js:
module.exports = { entry:["./script.js", "./file.swf", output:{ path:__dirname, filename:"bundle.js" }, module:{ loaders:[ //{} ] } };
module.exports = {
module: {
loaders: [
{ test: /\.swf$/, loader: "file?name=[path][name].[ext]" }
]
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.