mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-12-22 10:25:01 +00:00
[client/build] Try copying assets to app/ automagically, but we need a different plugin.
This commit is contained in:
parent
765dd1f91a
commit
cbe46ae0ce
3 changed files with 1193 additions and 9 deletions
1175
package-lock.json
generated
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…
Reference in a new issue