question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generate a unique css and js file

See original GitHub issue

What problem does this feature solve?

To be able to configure from vue.config.js or from vui ui, the option to have only one file for css y js , that the only way I see now it is that it generates multiple files or injecting.

What does the proposed API look like?

I would put the option in the vue.config.js the single option in css and js

module.exports = {
    productionSourceMap: false,
    baseUrl: './',
    outputDir: undefined,
    assetsDir: undefined,
    runtimeCompiler: undefined,
    parallel: undefined,
    css: {
        modules: false,
        .....single: true
    },
    js: {
       .....single: true

    },
    configureWebpack: {
        performance: {
            hints: false
        }
    }

}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
LinusBorgcommented, Aug 14, 2018

I’m not sure that I understand your request. What I understand so far is:

  1. You only want one .js file
module.exports = {
  chainWebpack: config =>  {
    // turn of code splitting.
    config.optimization.splitChunks(false)
  },
}

I don’ think we generate multiple css files explicitly, so not sure what to tell you about that.

1reaction
yyx990803commented, Aug 15, 2018

This has nothing to do with configurations… you are likely using the router, which comes with a default route config which imports the about page as an async component. Read router.js please. If you don’t want to split that component, just use normal imports instead of dynamic import.

This is why you should always include your actual code when reporting a bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to dynamically create CSS class in JavaScript and apply?
Here is an option: var style = document.createElement('style'); style.type = 'text/css'; style.innerHTML = '.cssClass { color: #F00; }'; document.
Read more >
Generate a CSS selector path of a DOM element.
Create an app.js file that generate unique CSS selector as given below in the code. In the app.js file, when any element is...
Read more >
Unique Pages, Unique CSS Files
You can create different CSS files when it is needed and it is useful for maintenance; but if you register all your CSS...
Read more >
Specify Unique CSS File Per Post - Digging Into WordPress
The idea is to add a simple text input to the page editor, right underneath the content area, where you can manually specify...
Read more >
css-selector-generator - npm
CSS Selector Generator. JavaScript object that creates a unique CSS selector for a given DOM element or multiple DOM elements.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found