【问题标题】:Svelte3/sapper/rollup exclude file pattern from compilationSvelte3/sapper/rollup 从编译中排除文件模式
【发布时间】:2020-09-09 06:45:08
【问题描述】:

我正在尝试为我正在使用 svelte + sapper 构建的应用设置 TDD 环境。

我需要在编译过程中忽略一些文件(默认使用rollup)...我需要排除它们的原因是我想为我的应用程序提供一个可扩展的脚手架,就像这样:

src
|___components
    |
    |___aComponent
        |___aComponent.svelte
        |___aComponent.test.js

(e2e 测试和集成可能会遵循不同的结构,以维护separation of concerns 而不是绑定routecomponent

我现在遇到的问题是 js 文件默认添加到项目中,因为当然我可能需要创建帮助类等。

我已经加了exclude: **/*.test.js,但是好像还不够。。。 这是我的configuration

【问题讨论】:

标签: configuration rollup svelte-3 sapper


【解决方案1】:

这出现在谷歌搜索中,可能是旧的,但在您的排除中,您有:

{
  exclude: ["node_modules/@babel/**", "**/*s.test.js"]  
}

代替:

{
  exclude: ["node_modules/@babel/**", "**/*.test.js"]  
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-02-06
    • 1970-01-01
    • 1970-01-01
    • 2015-06-04
    • 2019-06-19
    • 2016-11-23
    • 1970-01-01
    相关资源
    最近更新 更多