Updates to get the examples building

This commit is contained in:
Tim Schaub
2018-05-11 14:02:55 -06:00
parent 519e41db52
commit 1991150079
3 changed files with 4 additions and 4 deletions

View File

@@ -38,7 +38,6 @@ const main = {
{from: 'index.html', to: 'index.html'}
])
],
devtool: 'source-map',
output: {
filename: '[name].js',
path: path.join(__dirname, '..', '..', 'build', 'examples')
@@ -47,6 +46,7 @@ const main = {
// configuration specific to the dev environment
const dev = {
devtool: 'source-map',
plugins: [
new webpack.EnvironmentPlugin(
Object.assign({NODE_ENV: 'development'}, process.env)

View File

@@ -150,6 +150,7 @@ ExampleBuilder.prototype.render = async function(dir, chunk) {
break;
}
}
jsSource = jsSource.replace(/'\.\.\/src\//g, '\'');
if (data.cloak) {
for (const entry of data.cloak) {
jsSource = jsSource.replace(new RegExp(entry.key, 'g'), entry.value);