使用Vue Webpack导入带有/ *的多个scss文件失败

时间:2018-07-09 01:12:12

标签: webpack sass

当我使用以下命令导入多个局部时,我有一个main.scss

// Partials
@import "partials/*"

可悲的是,这导致构建失败:

./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-5ef48958","scoped":false,"hasInlineConfig":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/app.vue
Module build failed: 
@import "partials/*"
^
      File to import not found or unreadable: partials/*.

似乎多个选择器不起作用。我该怎么做才能解决此问题?

1 个答案:

答案 0 :(得分:1)

import java.util.Scanner;

import javax.swing.JOptionPane;

public class vote {

public static void main(String[] args) {
    // TODO Auto-generated method stub

    // Declare Strings and Initialize
            String PCandidate1=null;
            String Gender1=null;
            String Economy1= null;


    //Declare Integer
            int Age;
            int Trump=0;
            int Clinton=0;
            int Male=0;
            int Female=0;
            int MaleT=0;
            int FemaleT=0;
            int MaleC=0;
            int FemaleC=0;
            int Young=0;



    //all data read from a dialog box comes into a string
           String svalue,output ="";
    //Need to Implement While loop to keep collecting data

           int counter=0;
            while(counter<4) {
                counter++;
   //Vote for Presidential Candidate and Tally the Votes!

    svalue =JOptionPane.showInputDialog(null,"Will you Vote for  Clinton or  Trump?","Input Data",   JOptionPane.QUESTION_MESSAGE);
    svalue=JOptionPane.showInputDialog(null,"Are you Male or Female (M/F)?","Input Data",   JOptionPane.QUESTION_MESSAGE);
    if (svalue.equals("trump")||(svalue.equals("Trump")))
            {
      if (svalue.equals("F")||(svalue.equals("f")))
         Trump++; 
         Female++; 
         FemaleT++;}

     if (svalue.equals("Trump")||(svalue.equals("trump")))
             {
        if (svalue.equals("M")||(svalue.equals("m")))
        MaleT++;
        Trump++;
        Male++;}

    if (svalue.equals("clinton")||(svalue.equals("Clinton"))){

        if (svalue.equals("M")||(svalue.equals("m")))
        Clinton++;
        MaleC++;
        Male++;}

     if (svalue.equals("Clinton")||(svalue.equals("clinton"))){

        if(svalue.equals("F")||(svalue.equals("f"))) 
               FemaleC++;
               Clinton++;
               Female++;}
    PCandidate1= (svalue);






    //Inpute Users Age

    svalue=JOptionPane.showInputDialog(null,"What is Your Age?","Input Data",   JOptionPane.QUESTION_MESSAGE);
    Age=Integer.parseInt(svalue);
    if (Age<=25)
        Young++;

    // Get Users Input about State of the Economoy

    svalue=JOptionPane.showInputDialog(null,"Do you feel the economy is getting better?","Input Data",   JOptionPane.QUESTION_MESSAGE);
    Economy1= (svalue);
            }
    int Total=Male+Female;



  //Output The Data to Form
    output=output+"Users Voted For Trump:  " + Trump +"\n"
                  + "Users Voted For Clinton: "  + Clinton+ "\n"
                  +"Total Users Polled: " +(Total)+"\n"
                  + "Male Voters: "  + Male+ "\n"
                  + "Female Voters: "  + Female+ "\n"
                  + "% Female Voters for Clinton: "  + (FemaleC/Clinton)*100+ "\n"
                  + "% Male Voters for Clinton: "  + (MaleC/Clinton)*100+ "\n"
                  + "% Female Voters for Trump: "  + (FemaleT/Total)*100+ "\n"
                  + "% Male Voters for Trump: "  + (MaleT/Total)*100+ "\n"
                  + "Number of Young People Polled: "  + Young+ "\n"
                    ;






  //write all in a dialog box



    JOptionPane.showMessageDialog(null,
                    output,"Output:",JOptionPane.INFORMATION_MESSAGE);

    System.exit(0);

@import "partials/_all.scss"

包括所有需要的.scss文件