Static GitHub Issues

[2853] Generate single styles and scripts outside of _nuxt folder

prev: Weird behavior on "mounted" when altering data on a page
next: Long dynamic url paths

Is it possible to generate scripts and stylesheets directly in /dist folder? I need to generate all script files to a single file, the same with css (eg dist/app.js + dist/app.css).

I've tried disabling code splitting with build: { plugins: [ new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }) ],... but this leads to an error when serving the application Error while initializing app TypeError: __webpack_require__.e is not a function.

Is it possible to disable code splitting and generate single files for scripts and styles and generate them directly in /dist, and not in dist/_nuxt as default behavior.

I have created a node script that move the files out from dist/_nuxt, it then loops through all .html, .js and .css files and replaces paths eg: from: /\/_nuxt\/Styles/g, to: '/Styles'. This works with styling but javascript doesn't work, I'm not sure why. This is by far the best solution, it would be much better to be able to get Nuxt to generate these files outside of _nuxt folder. But if this is not possible I would be thankful to any suggestions how to get this to work.

Thanks!

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2480">#c2480</a>)</em></sub></div>