insin / nwb

A toolkit for React, Preact, Inferno & vanilla JS apps, React libraries and other npm modules for the web, with no configuration (until you need it)
Other
5.57k stars 331 forks source link

es lib There is no css file in it #573

Closed busyzz-1994 closed 3 years ago

busyzz-1994 commented 3 years ago

this is src/index.js:

import React from 'react';
import './index.scss';

this is nwb.config.js:

module.exports = {
  type: 'react-component',
  npm: {
    esModules: true,
    umd: {
      global: 'ReactWxImageGrid',
      externals: {
        react: 'React',
      },
    },
  },
};

this is lib/index.js:

require('./index.scss');

Not found ./index.scss This allowed me to introduce into the app causing an error,so how to solve this problem?