K
K
KnightForce2017-05-13 15:25:55
webpack
KnightForce, 2017-05-13 15:25:55

Webpack 2. Separate output for js files only?

entry: {
    bundle: "./javascripts/bundle",
    babelPolyfill: 'babel-polyfill',
    commons: "./javascripts/commons",
    style: './stylesheets/style.scss'
  },
  output: {
    path: path.join(__dirname, 'public'),
    filename: '[name].js',
    publicPath: '/public/', 
  },

Why isn't js placed in the javascripts package on build?
How to make sure that only js files are placed there?
ExtractTextPlugin and fileloader work fine and everything is forwarded to the right place.
I thought to write to output And add to the rest of the loaders , but then the file-loader does not work. path: path.join(__dirname, 'public/javascripts'),
../

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question