mirror of
https://github.com/react-webpack-generators/generator-react-webpack.git
synced 2025-12-08 18:01:59 +00:00
Use url-loader
This commit is contained in:
parent
c563513009
commit
26c229682d
@ -13,7 +13,7 @@ module.exports = function (grunt) {
|
|||||||
|
|
||||||
// Read configuration from package.json
|
// Read configuration from package.json
|
||||||
var pkgConfig = grunt.file.readJSON('package.json');
|
var pkgConfig = grunt.file.readJSON('package.json');
|
||||||
|
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
pkg: pkgConfig,
|
pkg: pkgConfig,
|
||||||
|
|
||||||
@ -29,10 +29,10 @@ module.exports = function (grunt) {
|
|||||||
options: {
|
options: {
|
||||||
port: 8000,
|
port: 8000,
|
||||||
webpack: webpackDevConfig,
|
webpack: webpackDevConfig,
|
||||||
publicPath: '/scripts/',
|
publicPath: '/assets/',
|
||||||
contentBase: './<%= pkg.src %>/',
|
contentBase: './<%= pkg.src %>/',
|
||||||
},
|
},
|
||||||
|
|
||||||
start: {
|
start: {
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,6 @@
|
|||||||
<div id="content">
|
<div id="content">
|
||||||
<h1>If you can see this, something is broken (or JS is not enabled)!!.</h1>
|
<h1>If you can see this, something is broken (or JS is not enabled)!!.</h1>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="scripts/main.js"></script>
|
<script type="text/javascript" src="assets/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -9,7 +9,8 @@
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
output: {
|
output: {
|
||||||
filename: 'main.js'
|
filename: 'main.js',
|
||||||
|
publicPath: '/assets/'
|
||||||
},
|
},
|
||||||
|
|
||||||
cache: true,
|
cache: true,
|
||||||
|
|||||||
@ -10,8 +10,8 @@ var webpack = require('webpack');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
output: {
|
output: {
|
||||||
publicPatch: 'dist/',
|
publicPath: '/assets/',
|
||||||
path: 'dist/scripts/',
|
path: 'dist/assets/',
|
||||||
filename: 'main.js'
|
filename: 'main.js'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ var ReactTransitionGroup = React.addons.TransitionGroup;
|
|||||||
require('../../styles/reset.css');
|
require('../../styles/reset.css');
|
||||||
require('../../styles/main.css');
|
require('../../styles/main.css');
|
||||||
|
|
||||||
var imageURL = '../../images/yeoman.png';
|
var imageURL = require('../../images/yeoman.png');
|
||||||
|
|
||||||
var <%= scriptAppName %> = React.createClass({
|
var <%= scriptAppName %> = React.createClass({
|
||||||
render: function() {
|
render: function() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user