1

我在捆绑我的应用程序时遇到了这些错误,我无法弄清楚为什么它不起作用。我用的是风格装载机之前,现在我想实现提取文本的插件,但得到这些错误:Webpack提取文本插件unknow word导出错误

enter image description here

的事情是所有的这实际上与风格装载机工作,我只是用抽取插件替换样式加载器,不更改任何其他加载器或插件,我搜索但没有找到任何解决方案。

vuetify.css可以在这里找到https://github.com/vuetifyjs/vuetify/tree/master/dist

这里是我的index.scss:

@import "default"; 
@import "list"; 
@import "page"; 
@import "toolbar"; 

这里是部分地方我导入文件:

import 'vuetify/dist/vuetify.min.css'; 
import './sass/index.scss'; 

的WebPack模块配置:

​​

插件配置:

plugins: [ 

    new webpack.DefinePlugin({ 
     'process.env': { 
      NODE_ENV: JSON.stringify(process.env.NODE_ENV), 
     } 
    }), 

    new CleanWebpackPlugin([ 
     getPath('../cordova/www/**'), 
    ], { 
     root: getPath('..'), 
    }), 

    new CopyWebpackPlugin([{ 
      from: getPath('../index.html'), 
      to: getPath('../cordova/www/index.html') 
     }, 
     { 
      from: getPath('../assets'), 
      to: getPath('../cordova/www/assets/') 
     }, 
    ]), 

    new webpack.ProvidePlugin({ 
     fetch: 'imports-loader?this=>global!exports-loader?global.fetch!whatwg-fetch' 
    }), 

    new webpack.LoaderOptionsPlugin({ 
     minimize: false, 
     debug: true 
    }), 

    new ExtractTextPlugin('styles.css') 

], 

回答

1

变化/\.css$/规则这一种。

{ 
    test: /\.css$/, 
    use: ExtractTextPlugin.extract({ 
     fallback: 'style-loader', 
     use: 'css-loader' 
    }) 
    } 
+0

非常感谢,解决了我所有的问题 – Gatsbill

相关问题