fix: add support for building on Windows (#2029)
Fixes #1919 * update path to sapper cli * use os-aware module rule tests
This commit is contained in:
parent
7a28bd2d88
commit
11fca7b792
|
@ -7,11 +7,11 @@
|
|||
"lint-fix": "standard --fix && standard --fix --plugin html 'src/routes/**/*.html'",
|
||||
"dev": "run-s build-template-html build-assets serve-dev",
|
||||
"serve-dev": "run-p --race build-template-html-watch sapper-dev",
|
||||
"sapper-dev": "cross-env NODE_ENV=development PORT=4002 node -r esm ./node_modules/.bin/sapper dev",
|
||||
"sapper-dev": "cross-env NODE_ENV=development PORT=4002 node -r esm ./node_modules/sapper/sapper dev",
|
||||
"before-build": "run-s build-template-html build-assets",
|
||||
"build": "cross-env NODE_ENV=production run-s build-steps",
|
||||
"build-steps": "run-s before-build sapper-export build-vercel-json",
|
||||
"sapper-build": "node -r esm ./node_modules/.bin/sapper build",
|
||||
"sapper-build": "node -r esm ./node_modules/sapper/sapper build",
|
||||
"start": "node server.js",
|
||||
"build-and-start": "run-s build start",
|
||||
"build-template-html": "node -r esm ./bin/build-template-html.js",
|
||||
|
@ -31,7 +31,7 @@
|
|||
"wait-for-mastodon-to-start": "node -r esm bin/wait-for-mastodon-to-start.js",
|
||||
"wait-for-mastodon-data": "node -r esm bin/wait-for-mastodon-data.js",
|
||||
"backup-mastodon-data": "./bin/backup-mastodon-data.sh",
|
||||
"sapper-export": "cross-env PORT=22939 node -r esm ./node_modules/.bin/sapper export",
|
||||
"sapper-export": "cross-env PORT=22939 node -r esm ./node_modules/sapper/sapper export",
|
||||
"print-export-info": "node ./bin/print-export-info.js",
|
||||
"export-steps": "run-s before-build sapper-export print-export-info",
|
||||
"export": "cross-env NODE_ENV=production run-s export-steps",
|
||||
|
|
|
@ -37,7 +37,9 @@ module.exports = {
|
|||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\/_workers\/blurhash\.js$/,
|
||||
test: input => {
|
||||
return input.endsWith(path.join("_workers", "blurhash.js"));
|
||||
},
|
||||
use: {
|
||||
loader: 'worker-loader',
|
||||
options: {
|
||||
|
@ -46,12 +48,14 @@ module.exports = {
|
|||
}
|
||||
},
|
||||
{
|
||||
test: [
|
||||
/tesseract\.js\/dist\/worker\.min\.js$/,
|
||||
/tesseract\.js\/dist\/worker\.min\.js.map$/,
|
||||
/tesseract\.js-core\/tesseract-core\.wasm$/,
|
||||
/tesseract\.js-core\/tesseract-core\.wasm.js$/
|
||||
],
|
||||
test: input => {
|
||||
return (
|
||||
input.endsWith(path.join("tesseract.js", "dist", "worker.min.js")) ||
|
||||
input.endsWith(path.join("tesseract.js", "dist", "worker.min.js.map")) ||
|
||||
input.endsWith(path.join("tesseract.js-core", "tesseract-core.wasm")) ||
|
||||
input.endsWith(path.join("tesseract.js-core", "tesseract-core.wasm.js"))
|
||||
);
|
||||
},
|
||||
use: {
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
|
|
Loading…
Reference in New Issue