Inline scripts in HTML files

This commit is contained in:
Michael Jackson
2019-01-24 15:49:21 -08:00
parent e6134b0969
commit ea85062ff6
16 changed files with 350 additions and 136 deletions

View File

@ -1,7 +1,10 @@
require('dotenv').config();
const path = require('path');
const builtinModules = require('module').builtinModules;
const babel = require('rollup-plugin-babel');
const commonjs = require('rollup-plugin-commonjs');
const compiler = require('@ampproject/rollup-plugin-closure-compiler');
const json = require('rollup-plugin-json');
const replace = require('rollup-plugin-replace');
const resolve = require('rollup-plugin-node-resolve');
@ -12,9 +15,6 @@ const entryManifest = require('./plugins/entryManifest');
const env = process.env.NODE_ENV || 'development';
const dev = env === 'development';
// Allow storing env vars in .env in dev.
if (dev) require('dotenv').config();
const manifest = entryManifest();
const client = ['main', 'autoIndex'].map(entryName => {
@ -53,7 +53,8 @@ const client = ['main', 'autoIndex'].map(entryName => {
url({
limit: 5 * 1024,
publicPath: '/_client/'
})
}),
compiler(dev ? { formatting: 'PRETTY_PRINT' } : undefined)
]
};
});