Add fonts copy to rollup config
This commit is contained in:
parent
92c6433235
commit
7f4996c908
@ -70,6 +70,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rollup/plugin-commonjs": "^21.0.1",
|
"@rollup/plugin-commonjs": "^21.0.1",
|
||||||
"@rollup/plugin-node-resolve": "^13.0.6",
|
"@rollup/plugin-node-resolve": "^13.0.6",
|
||||||
|
"@rollup/plugin-url": "^6.1.0",
|
||||||
"argon2": "^0.28.2",
|
"argon2": "^0.28.2",
|
||||||
"clear-module": "^4.1.1",
|
"clear-module": "^4.1.1",
|
||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
|
@ -6,6 +6,7 @@ import commonjs from "@rollup/plugin-commonjs";
|
|||||||
import {terser} from "rollup-plugin-terser";
|
import {terser} from "rollup-plugin-terser";
|
||||||
import livereloadRollupPlugin from "rollup-plugin-livereload";
|
import livereloadRollupPlugin from "rollup-plugin-livereload";
|
||||||
import imageminPlugin from "rollup-plugin-imagemin";
|
import imageminPlugin from "rollup-plugin-imagemin";
|
||||||
|
import url from "@rollup/plugin-url";
|
||||||
|
|
||||||
const production = process.env.ENV === 'production';
|
const production = process.env.ENV === 'production';
|
||||||
const buildDir = process.env.BUILD_DIR;
|
const buildDir = process.env.BUILD_DIR;
|
||||||
@ -41,6 +42,15 @@ export default commandLineArgs => ({
|
|||||||
// Extract css into separate files
|
// Extract css into separate files
|
||||||
cssOnlyRollupPlugin({output: 'bundle.css'}),
|
cssOnlyRollupPlugin({output: 'bundle.css'}),
|
||||||
|
|
||||||
|
url({
|
||||||
|
include: [
|
||||||
|
'**/*.woff2?',
|
||||||
|
'**/*.ttf',
|
||||||
|
],
|
||||||
|
limit: 0,
|
||||||
|
fileName: path.join('../', 'fonts', '[name][extname]'),
|
||||||
|
}),
|
||||||
|
|
||||||
// If you have external dependencies installed from
|
// If you have external dependencies installed from
|
||||||
// npm, you'll most likely need these plugins. In
|
// npm, you'll most likely need these plugins. In
|
||||||
// some cases you'll need additional configuration -
|
// some cases you'll need additional configuration -
|
||||||
|
@ -601,6 +601,15 @@
|
|||||||
is-module "^1.0.0"
|
is-module "^1.0.0"
|
||||||
resolve "^1.19.0"
|
resolve "^1.19.0"
|
||||||
|
|
||||||
|
"@rollup/plugin-url@^6.1.0":
|
||||||
|
version "6.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@rollup/plugin-url/-/plugin-url-6.1.0.tgz#1234bba9aa30b5972050bdfcf8fcbb1cb8070465"
|
||||||
|
integrity sha512-FJNWBnBB7nLzbcaGmu1no+U/LlRR67TtgfRFP+VEKSrWlDTE6n9jMns/N4Q/VL6l4x6kTHQX4HQfwTcldaAfHQ==
|
||||||
|
dependencies:
|
||||||
|
"@rollup/pluginutils" "^3.1.0"
|
||||||
|
make-dir "^3.1.0"
|
||||||
|
mime "^2.4.6"
|
||||||
|
|
||||||
"@rollup/pluginutils@4":
|
"@rollup/pluginutils@4":
|
||||||
version "4.1.1"
|
version "4.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.1.tgz#1d4da86dd4eded15656a57d933fda2b9a08d47ec"
|
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.1.tgz#1d4da86dd4eded15656a57d933fda2b9a08d47ec"
|
||||||
|
Loading…
Reference in New Issue
Block a user