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

pull/26/head
Starbeamrainbowlabs 4 years ago
parent 765dd1f91a
commit cbe46ae0ce
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 1175
      package-lock.json
  2. 1
      package.json
  3. 26
      rollup.config.js

1175
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -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",

@ -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
// }
// })
]
};

Loading…
Cancel
Save