No longer need to put ruffle stuff in source tree. Made ruffle not use
polyfills also.
This commit is contained in:
parent
d695dcaff9
commit
2f549774ab
|
@ -21,6 +21,7 @@ var compiler = webpack(webpackConfig)
|
||||||
|
|
||||||
var devMiddleware = require('webpack-dev-middleware')(compiler, {
|
var devMiddleware = require('webpack-dev-middleware')(compiler, {
|
||||||
publicPath: webpackConfig.output.publicPath,
|
publicPath: webpackConfig.output.publicPath,
|
||||||
|
writeToDisk: true,
|
||||||
stats: {
|
stats: {
|
||||||
colors: true,
|
colors: true,
|
||||||
chunks: false
|
chunks: false
|
||||||
|
|
|
@ -3,6 +3,7 @@ var config = require('../config')
|
||||||
var utils = require('./utils')
|
var utils = require('./utils')
|
||||||
var projectRoot = path.resolve(__dirname, '../')
|
var projectRoot = path.resolve(__dirname, '../')
|
||||||
var ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin')
|
var ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin')
|
||||||
|
var CopyPlugin = require('copy-webpack-plugin');
|
||||||
|
|
||||||
var env = process.env.NODE_ENV
|
var env = process.env.NODE_ENV
|
||||||
// check env & config/index.js to decide weither to enable CSS Sourcemaps for the
|
// check env & config/index.js to decide weither to enable CSS Sourcemaps for the
|
||||||
|
@ -93,6 +94,19 @@ module.exports = {
|
||||||
new ServiceWorkerWebpackPlugin({
|
new ServiceWorkerWebpackPlugin({
|
||||||
entry: path.join(__dirname, '..', 'src/sw.js'),
|
entry: path.join(__dirname, '..', 'src/sw.js'),
|
||||||
filename: 'sw-pleroma.js'
|
filename: 'sw-pleroma.js'
|
||||||
|
}),
|
||||||
|
// This copies Ruffle's WASM to a directory so that JS side can access it
|
||||||
|
new CopyPlugin({
|
||||||
|
patterns: [
|
||||||
|
{
|
||||||
|
from: "node_modules/ruffle-mirror/*",
|
||||||
|
to: "static/ruffle",
|
||||||
|
flatten: true
|
||||||
|
},
|
||||||
|
],
|
||||||
|
options: {
|
||||||
|
concurrency: 100,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
|
||||||
<!--server-generated-meta-->
|
<!--server-generated-meta-->
|
||||||
<link rel="icon" type="image/png" href="/favicon.png">
|
<link rel="icon" type="image/png" href="/favicon.png">
|
||||||
<script src="/static/js/ruffle.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body class="hidden">
|
<body class="hidden">
|
||||||
<noscript>To use Pleroma, please enable JavaScript.</noscript>
|
<noscript>To use Pleroma, please enable JavaScript.</noscript>
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
"phoenix": "^1.3.0",
|
"phoenix": "^1.3.0",
|
||||||
"portal-vue": "^2.1.4",
|
"portal-vue": "^2.1.4",
|
||||||
"punycode.js": "^2.1.0",
|
"punycode.js": "^2.1.0",
|
||||||
|
"ruffle-mirror": "^2021.4.10",
|
||||||
"v-click-outside": "^2.1.1",
|
"v-click-outside": "^2.1.1",
|
||||||
"vue": "^2.6.11",
|
"vue": "^2.6.11",
|
||||||
"vue-i18n": "^7.3.2",
|
"vue-i18n": "^7.3.2",
|
||||||
|
@ -57,6 +58,7 @@
|
||||||
"chalk": "^1.1.3",
|
"chalk": "^1.1.3",
|
||||||
"chromedriver": "^87.0.1",
|
"chromedriver": "^87.0.1",
|
||||||
"connect-history-api-fallback": "^1.1.0",
|
"connect-history-api-fallback": "^1.1.0",
|
||||||
|
"copy-webpack-plugin": "^6.4.1",
|
||||||
"cross-spawn": "^4.0.2",
|
"cross-spawn": "^4.0.2",
|
||||||
"css-loader": "^0.28.0",
|
"css-loader": "^0.28.0",
|
||||||
"custom-event-polyfill": "^1.0.7",
|
"custom-event-polyfill": "^1.0.7",
|
||||||
|
@ -111,7 +113,7 @@
|
||||||
"url-loader": "^1.1.2",
|
"url-loader": "^1.1.2",
|
||||||
"vue-loader": "^14.0.0",
|
"vue-loader": "^14.0.0",
|
||||||
"vue-style-loader": "^4.0.0",
|
"vue-style-loader": "^4.0.0",
|
||||||
"webpack": "^4.0.0",
|
"webpack": "^4.44.0",
|
||||||
"webpack-dev-middleware": "^3.6.0",
|
"webpack-dev-middleware": "^3.6.0",
|
||||||
"webpack-hot-middleware": "^2.12.2",
|
"webpack-hot-middleware": "^2.12.2",
|
||||||
"webpack-merge": "^0.14.1"
|
"webpack-merge": "^0.14.1"
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
|
import RuffleService from '../../services/ruffle_service/ruffle_service.js'
|
||||||
|
|
||||||
const Flash = {
|
const Flash = {
|
||||||
props: [
|
props: [ 'src' ],
|
||||||
'src'
|
created () {
|
||||||
],
|
|
||||||
created: function () {
|
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
const ruffle = window.RufflePlayer.newest()
|
RuffleService.getRuffle().then((ruffle) => {
|
||||||
const player = ruffle.createPlayer()
|
const player = ruffle.newest().createPlayer()
|
||||||
const container = this.$refs.cunt
|
const container = this.$refs.cunt
|
||||||
container.appendChild(player)
|
container.appendChild(player)
|
||||||
player.load(this.src)
|
player.load(this.src)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue