json-to-scss icon indicating copy to clipboard operation
json-to-scss copied to clipboard

import error,"error(s) found while parsing; content skipped. File skipped! "

Open bestRenekton opened this issue 4 years ago • 0 comments

hi,my program is in es6 not commonjs.i have a config like

  • app.config.ts
const APP_CONFIG = {
  MOCK: {
    port: "1000", 
    apiPrefix: "/api", 
  },
  THEME: {
    scssVariable: {
      uni: {
        "color-primary": "#4cd961",
        "color-success": "#4cd964",
        "color-warning": "#f0ad4e",
        "color-error": "#dd524d"
      }
    }
  },
  ...
};
export default APP_CONFIG;
  • theme.js
const  config = require("../app.config.ts");
module.exports = config.THEME.scssVariable;
  • i want get theme.scss like this
$uni-color-primary: #4cd961;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;

when i use export default APP_CONFIG, it error error(s) found while parsing; content skipped. File skipped! when i use module.exports = APP_CONFIG;,it's commonjs!so it work ! but i want use es6,because my program is in es6,use commonjs make error many place.....

bestRenekton avatar Jan 13 '21 01:01 bestRenekton