Javascript Sapper:如何从node_模块导入CSS?

Javascript Sapper:如何从node_模块导入CSS?,javascript,svelte,sapper,Javascript,Svelte,Sapper,我正在尝试这样做(在sapper中): @导入'filepond plugin image preview/dist/filepond plugin image preview.css'; 但是在前端得到404 还可以从正在导入CSS的模块中看到404。能否显示汇总配置? You can easily import CSS directly from your node_modules folder using the webpack and the CSS Loader. This is

我正在尝试这样做(在sapper中):


@导入'filepond plugin image preview/dist/filepond plugin image preview.css';
但是在前端得到404


还可以从正在导入CSS的模块中看到404。

能否显示汇总配置?
You can easily import CSS directly from your node_modules folder using the webpack and the CSS Loader. This is superior to just copy-and-pasting the CSS code because it ensures that the CSS style you are using for your website will always be in sync with your version of the library

By Using (~) you can import the CSS from the Node Modules:-

@import "~package/css-stylesheet";

div {
  background-image: url("~package/image.jpeg");
}
You can easily import CSS directly from your node_modules folder using the webpack and the CSS Loader. This is superior to just copy-and-pasting the CSS code because it ensures that the CSS style you are using for your website will always be in sync with your version of the library

By Using (~) you can import the CSS from the Node Modules:-

@import "~package/css-stylesheet";

div {
  background-image: url("~package/image.jpeg");
}