[client/build] Try copying assets to app/ automagically, but we need a different plugin.

This commit is contained in:
Starbeamrainbowlabs 2019-01-20 00:56:40 +00:00
parent 765dd1f91a
commit cbe46ae0ce
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
3 changed files with 1193 additions and 9 deletions

1175
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -29,6 +29,7 @@
"@types/leaflet": "^1.2.14",
"@types/leaflet-fullscreen": "^1.0.4",
"leaflet-heatmap": "^1.0.0",
"postcss-copy": "^7.1.0",
"postcss-import": "^12.0.1",
"postcss-url": "^8.0.0",
"rollup": "^1.1.0",

View file

@ -1,4 +1,5 @@
import os from 'os';
import path from 'path';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
@ -7,6 +8,7 @@ import { terser } from "rollup-plugin-terser";
import postcss_import from 'postcss-import';
import postcss_url from 'postcss-url';
import postcss_copy from 'postcss-copy';
export default {
input: 'client_src/js/index.mjs',
@ -45,10 +47,16 @@ export default {
postcss({
plugins: [
postcss_import({}),
postcss_url({
url: "copy",
assetPath: "resources"
postcss_copy({
dest: "app",
template: "resources/[name].[ext]"
})
// postcss_url(),
// postcss_url({
// url: "copy",
// basePath: path.resolve("."),
// assetPath: "resources"
// })
],
// Save it to a .css file - we'll reference it ourselves thank you
// very much
@ -57,11 +65,11 @@ export default {
//minimize: true, // Causes an error at the moment for some reason
}),
terser({
numWorkers: os.cpus().length,
compress: {
ecma: 6
}
})
// terser({
// numWorkers: os.cpus().length,
// compress: {
// ecma: 6
// }
// })
]
};