rollup config
This commit is contained in:
parent
0dbbfc1663
commit
87bc10094e
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
"version": "beeeeeeta",
|
"version": "beeeeeeta",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rm -rf ./dist/ && rollup src/js/main.js --file dist/engine-$(npm pkg get version | tr -d '\"').js --format es",
|
"build": "rollup --config rollup.config.js",
|
||||||
|
"watch": "ROLLUP_WATCH=true rollup --config rollup.config.js --watch",
|
||||||
"prettier-check": "prettier --check .",
|
"prettier-check": "prettier --check .",
|
||||||
"prettier-write": "prettier --write .",
|
"prettier-write": "prettier --write .",
|
||||||
"editorconfig-check": "ec -exclude 'node_modules' .",
|
"editorconfig-check": "ec -exclude 'node_modules' .",
|
||||||
|
9
rollup.config.js
Normal file
9
rollup.config.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import pkg from './package.json' assert { type: 'json' };
|
||||||
|
|
||||||
|
export default {
|
||||||
|
input: 'src/main.js',
|
||||||
|
output: {
|
||||||
|
file: `dist/engine-${pkg.version}.js`,
|
||||||
|
format: 'es',
|
||||||
|
},
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user