|
|
@@ -1,9 +1,10 @@
|
|
|
const fs = require('fs');
|
|
|
const path = require('path');
|
|
|
|
|
|
-const stylesJSFile = fs.readFileSync(path.resolve(__dirname, '../dist/assets/styles_bundle.js'));
|
|
|
-const agentJSFile = fs.readFileSync(path.resolve(__dirname, '../dist/assets/agent_bundle.js'));
|
|
|
-const stylesCSSFile = fs.readFileSync(path.resolve(__dirname, '../dist/assets/styles_bundle.css'));
|
|
|
+const isProduction = process.env.NODE_ENV === 'production';
|
|
|
+const stylesJSFile = fs.readFileSync(path.resolve(__dirname, isProduction ? './styles.js' : '../dist/styles.js'));
|
|
|
+const agentJSFile = fs.readFileSync(path.resolve(__dirname, isProduction ? './agent.js' : '../dist/agent.js'));
|
|
|
+const stylesCSSFile = fs.readFileSync(path.resolve(__dirname, isProduction ? './styles.css' : '../dist/styles.css'));
|
|
|
|
|
|
// export to app as string
|
|
|
export const stylesJS = stylesJSFile.toString();
|