Skip to content
Snippets Groups Projects
Commit 2b8c0b79 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Switch to rollup-plugin-consts

parent 7b5d1b56
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ module.exports = function(config) { ...@@ -6,7 +6,7 @@ module.exports = function(config) {
basePath: 'dist', basePath: 'dist',
frameworks: ['mocha', 'chai'], frameworks: ['mocha', 'chai'],
files: [ files: [
'./bundle.js', {pattern: './*.js', included: true, watched: true, served: true, type: 'module'},
{pattern: './**/*', included: false, watched: true, served: true}, {pattern: './**/*', included: false, watched: true, served: true},
], ],
autoWatch: true, autoWatch: true,
......
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
"puppeteer": "^1.15.0", "puppeteer": "^1.15.0",
"rollup": "^1.20.0", "rollup": "^1.20.0",
"rollup-plugin-commonjs": "^10.0.2", "rollup-plugin-commonjs": "^10.0.2",
"rollup-plugin-consts": "^1.0.1",
"rollup-plugin-copy": "^3.1.0", "rollup-plugin-copy": "^3.1.0",
"rollup-plugin-json": "^4.0.0", "rollup-plugin-json": "^4.0.0",
"rollup-plugin-multi-entry": "^2.1.0", "rollup-plugin-multi-entry": "^2.1.0",
"rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-postcss": "^2.0.3", "rollup-plugin-postcss": "^2.0.3",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-serve": "^1.0.1", "rollup-plugin-serve": "^1.0.1",
"rollup-plugin-terser": "^5.1.1", "rollup-plugin-terser": "^5.1.1",
"vpu-common": "file:./vendor/common" "vpu-common": "file:./vendor/common"
......
...@@ -5,9 +5,9 @@ import postcss from 'rollup-plugin-postcss'; ...@@ -5,9 +5,9 @@ import postcss from 'rollup-plugin-postcss';
import copy from 'rollup-plugin-copy'; import copy from 'rollup-plugin-copy';
import {terser} from "rollup-plugin-terser"; import {terser} from "rollup-plugin-terser";
import json from 'rollup-plugin-json'; import json from 'rollup-plugin-json';
import replace from "rollup-plugin-replace";
import serve from 'rollup-plugin-serve'; import serve from 'rollup-plugin-serve';
import multiEntry from 'rollup-plugin-multi-entry'; import multiEntry from 'rollup-plugin-multi-entry';
import consts from 'rollup-plugin-consts';
const build = (typeof process.env.BUILD !== 'undefined') ? process.env.BUILD : 'local'; const build = (typeof process.env.BUILD !== 'undefined') ? process.env.BUILD : 'local';
console.log("build: " + build); console.log("build: " + build);
...@@ -20,6 +20,9 @@ export default { ...@@ -20,6 +20,9 @@ export default {
}, },
plugins: [ plugins: [
multiEntry(), multiEntry(),
consts({
environment: build,
}),
resolve({ resolve({
customResolveOptions: { customResolveOptions: {
// ignore node_modules from vendored packages // ignore node_modules from vendored packages
...@@ -30,9 +33,6 @@ export default { ...@@ -30,9 +33,6 @@ export default {
include: 'node_modules/**' include: 'node_modules/**'
}), }),
json(), json(),
replace({
"process.env.BUILD": '"' + build + '"',
}),
postcss({ postcss({
inject: false, inject: false,
minimize: false, minimize: false,
......
common @ 91947464
Subproject commit f310ba99da6347270774f6a9554368128f86721b Subproject commit 91947464b55c79c5b0aa2188f512e08ebc0be612
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment