Merge branch 'dev' of github.com:nuxt/nuxt.js into dev

This commit is contained in:
Sebastien Chopin 2017-08-03 10:47:23 +02:00
commit 94d6bdc7b2
3 changed files with 11 additions and 1 deletions

View File

@ -35,6 +35,7 @@ export default function webpackBaseConfig ({ isClient, isServer }) {
output: { output: {
path: resolve(this.options.buildDir, 'dist'), path: resolve(this.options.buildDir, 'dist'),
filename: this.options.build.filenames.app, filename: this.options.build.filenames.app,
chunkFilename: this.options.build.filenames.chunk,
publicPath: (isUrl(this.options.build.publicPath) publicPath: (isUrl(this.options.build.publicPath)
? this.options.build.publicPath ? this.options.build.publicPath
: urlJoin(this.options.router.base, this.options.build.publicPath)) : urlJoin(this.options.router.base, this.options.build.publicPath))
@ -105,6 +106,13 @@ export default function webpackBaseConfig ({ isClient, isServer }) {
limit: 1000, // 1 KO limit: 1000, // 1 KO
name: 'fonts/[name].[hash:7].[ext]' name: 'fonts/[name].[hash:7].[ext]'
} }
},
{
test: /\.(webm|mp4)$/,
loader: 'file',
query: {
name: 'videos/[name].[hash:7].[ext]'
}
} }
] ]
}, },

View File

@ -122,6 +122,7 @@ export default function webpackClientConfig () {
// Add HMR support // Add HMR support
config.entry.app = ['webpack-hot-middleware/client?name=$client&reload=true', config.entry.app] config.entry.app = ['webpack-hot-middleware/client?name=$client&reload=true', config.entry.app]
config.output.filename = '[name].js' config.output.filename = '[name].js'
config.output.chunkFilename = '[id].js'
config.plugins.push( config.plugins.push(
new webpack.HotModuleReplacementPlugin(), new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin() new webpack.NoEmitOnErrorsPlugin()

View File

@ -104,7 +104,8 @@ Options.defaults = {
css: 'common.[chunkhash].css', css: 'common.[chunkhash].css',
manifest: 'manifest.[hash].js', manifest: 'manifest.[hash].js',
vendor: 'vendor.bundle.[chunkhash].js', vendor: 'vendor.bundle.[chunkhash].js',
app: 'nuxt.bundle.[chunkhash].js' app: 'nuxt.bundle.[chunkhash].js',
chunk: '[id].nuxt.bundle.[chunkhash].js'
}, },
vendor: [], vendor: [],
plugins: [], plugins: [],