Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin does not support vue.js #51

Open
lipton-v opened this issue Aug 25, 2019 · 0 comments
Open

Plugin does not support vue.js #51

lipton-v opened this issue Aug 25, 2019 · 0 comments

Comments

@lipton-v
Copy link

lipton-v commented Aug 25, 2019

Hello,
I am using manifest-revision-webpack-plugin. I have to use vue.js as well. Without vue plugin works well. But there is a problem with vue components. Styles from vue components are not applying.
Without flask, jinja2, manifest-revision-webpack-plugin there are no problems. Simple:

<link href="..." rel="stylesheet">

to add css file to html. Vue components work well. So webpack.config.js does not contains errors and does not have wrong settings. But I have to use flask, etc.
I want to unite manifest-revision-webpack-plugin and vue.js with working css-styles in vue components.

Currently styles in components are not applying to tags and styles from vue components are also not applying to index.css

webpack.config.js

entry: {
        index_js: [
            PATHS.assets + '/scripts/index.js'
        ],
        index_css: [
            PATHS.assets + '/styles/index.css'
        ]
},
module: {
        rules: [          
            {
                test: /\.vue$/,
                loader: 'vue-loader',
                options: {
                    loader: {
                        scss: 'vue-style-loader!css-loader!sass-loader'
                    }
                }
            },
            {
                test: /\.scss$/,
                use: [
                    'style-loader',
                    MiniCssExtractPlugin.loader,
                    {
                        loader: 'css-loader',
                        options: { sourceMap: true }
                    },
                    {
                        loader: 'sass-loader',
                        options: { sourceMap: true }
                    }
                ]
            },
            {
                test: /\.css$/,
                use: [
                    'style-loader',
                    MiniCssExtractPlugin.loader,
                    {
                        loader: 'css-loader',
                        options: { sourceMap: true }
                    }
                ]
            }
 },
plugins: [
        new VueLoaderPlugin(),
        new MiniCssExtractPlugin (PATHS.assets + '/styles/[name].[chunkhash].css'),
        new ManifestRevisionPlugin(path.join(PATHS.build, 'manifest.json'), {
            rootAssetPath: PATHS.assets,
            ignorePaths: ['/styles', '/scripts'],
            extensionsRegex: /\.(jpe?g|png|gif|svg)$/i
        })
    ]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant